User (Legacy) Posted January 17, 2007 Report Share Posted January 17, 2007 I can't seem to find an example of manually populating the data for a stacked bar chart. The object model has changed quite a bit from 6.2 and you folks no longer put a little manual code sample next to all your chart samples like you used to (ugh). A DataSet sample or Xml sample doesn't help me much. I do have to hard code the series legend indexes etc... I need to have an x axis legend of a-d with stacked sections for 1-3 on each a-d. a b c d 1 .14 0.14 0.22 0.23 2 .57 0.22 0.32 0.33 3 .66 0.11 0.20 0.14 Attachments.zip Link to comment Share on other sites More sharing options...
Software FX Posted January 19, 2007 Report Share Posted January 19, 2007 The model for the data is the same for 6.2 and 7.0 although the API changed quite a bit. You need 3 series (1-3) and 4 points (a-d). chart.Data.Series = 3; chart.Data.Points = 4; chart.Data[0,0] = GetData(1,a); chart.Data[0,1] = GetData(1,; chart.Data[0,2] = GetData(1,c); chart.Data[0,3] = GetData(1,d); chart.Data[1,0] = GetData(2,a); chart.Data[1,1] = GetData(2,; chart.Data[1,2] = GetData(2,c); chart.Data[1,3] = GetData(2,d); ... chart.Series[0].Text = "1"; chart.Series[1].Text = "2"; chart.Series[2].Text = "3"; chart.AxisX.Labels[0] = "a"; chart.AxisX.Labels[1] = "b"; chart.AxisX.Labels[2] = "c"; chart.AxisX.Labels[3] = "d"; -- Francisco Padron www.chartfx.com Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.