New to Hotspots
Posted: Tue Jan 03, 2006 3:29 pm
I'm trying to get a simple chart with hot spots, then have the URL say something like "www.test.asp?type=A" or "www.test.asp?type=B", depending on which bar I click
I found the standard hotspot example - it works somewhat, but ALL the bars in the graph are ponting to the same destination. How do I differentiate the hotspots between the bars?
See code below.
DataSet masterDataSet = new DataSet();
Bar bar1 = new Steema.TeeChart.Styles.Bar(WebChart1.Chart);
try
{
OpenConn(ref masterDataSet, "1");
DataTable appTable = masterDataSet.Tables["Applications"];
bar1.YValues.DataMember = appTable.Columns["Counter"].ToString();
bar1.LabelMember = appTable.Columns["appStage"].ToString();
bar1.DataSource = appTable;
//Add Tooltip
Steema.TeeChart.Chart Chart1 = WebChart1.Chart;
Steema.TeeChart.Tools.SeriesHotspot seriesHotSpot1 = new Steema.TeeChart.Tools.SeriesHotspot(Chart1);
seriesHotSpot1.MapAction = Steema.TeeChart.Styles.MapAction.Mark;
//Add Hotspot Destination
seriesHotSpot1.MapAction = Steema.TeeChart.Styles.MapAction.URL;
seriesHotSpot1.GetHTMLMap += new Steema.TeeChart.Tools.SeriesHotspotEventHandler(seriesHotSpot1_GetHTMLMap);
}
catch (SecurityException) {
//lblMsg.Text = "Error in Connection...";
}
private void seriesHotSpot1_GetHTMLMap(Steema.TeeChart.Tools.SeriesHotspot sender, Steema.TeeChart.Tools.SeriesHotspotEventArgs e)
{
e.PointPolygon.Title = "Go to the Steema web";
e.PointPolygon.HREF = "http://www.test.com"; //All the bars are going to this destination. How do I differentiate between bars?
e.PointPolygon.Attributes = "target='bottomFrame'";
}
Thanks in Advance!
I found the standard hotspot example - it works somewhat, but ALL the bars in the graph are ponting to the same destination. How do I differentiate the hotspots between the bars?
See code below.
DataSet masterDataSet = new DataSet();
Bar bar1 = new Steema.TeeChart.Styles.Bar(WebChart1.Chart);
try
{
OpenConn(ref masterDataSet, "1");
DataTable appTable = masterDataSet.Tables["Applications"];
bar1.YValues.DataMember = appTable.Columns["Counter"].ToString();
bar1.LabelMember = appTable.Columns["appStage"].ToString();
bar1.DataSource = appTable;
//Add Tooltip
Steema.TeeChart.Chart Chart1 = WebChart1.Chart;
Steema.TeeChart.Tools.SeriesHotspot seriesHotSpot1 = new Steema.TeeChart.Tools.SeriesHotspot(Chart1);
seriesHotSpot1.MapAction = Steema.TeeChart.Styles.MapAction.Mark;
//Add Hotspot Destination
seriesHotSpot1.MapAction = Steema.TeeChart.Styles.MapAction.URL;
seriesHotSpot1.GetHTMLMap += new Steema.TeeChart.Tools.SeriesHotspotEventHandler(seriesHotSpot1_GetHTMLMap);
}
catch (SecurityException) {
//lblMsg.Text = "Error in Connection...";
}
private void seriesHotSpot1_GetHTMLMap(Steema.TeeChart.Tools.SeriesHotspot sender, Steema.TeeChart.Tools.SeriesHotspotEventArgs e)
{
e.PointPolygon.Title = "Go to the Steema web";
e.PointPolygon.HREF = "http://www.test.com"; //All the bars are going to this destination. How do I differentiate between bars?
e.PointPolygon.Attributes = "target='bottomFrame'";
}
Thanks in Advance!