rjb Posted March 27, 2008 Report Share Posted March 27, 2008 I am loading data into a Chart component from a dataset via Chart.DataSource and DataBind(). The dataset is actually populated in code from several other datasets, and the data successfully split into separate series, with related series grouped using panes. That all works nicely. I need to display additional arbitrary information in each data point's tooltip. I have been experimenting with storing the additional information in Chart.Points[<series>, <point>].Text and modifying the ToolTipFormat to include the %L format specifier.My problem is, how do I map the data points in the dataset being used to populate the chart to their corresponding entries in the Chart.Points collection, i.e. how do I work out their series and point indices? I seem to be able to get the right series, but the point index does not seem so straight forward. I need to do this so that I can assign data from rows in the dataset to the correct Chart.Points[<series>, <point>].Text. If I can crack that, the whole thing will work beautifully.Thanks in advance Quote Link to comment Share on other sites More sharing options...
maximop Posted April 11, 2008 Report Share Posted April 11, 2008 The easiest way to look at this is by seeing that each series represents a column in your table, while each point represents a row within that column. For example, if you are setting the Text property as follows, chart1.Points[0, 5].Text, then you are doing so for the first column and sixth row of the table being passed to the chart. Quote Link to comment Share on other sites More sharing options...
rjb Posted May 16, 2008 Author Report Share Posted May 16, 2008 Thanks; I pretty much figured it out shortly after posting, but it was good to get the "official" answer. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.