Jump to content
Software FX Community

Mapping rows in DataSource to entries in Chart.Points[series, point]


rjb

Recommended Posts

Posted

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 

  • 3 weeks later...
Posted

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.

  • 1 month later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...