Jump to content
Software FX Community

kennfarbe

Members
  • Posts

    1
  • Joined

  • Last visited

kennfarbe's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hi!I have a problem with my chart. If I add a serie with an area, the serie with the bar is now from top to bottom and not from bottom to top. What can I do that the bar will be display again as normal from the botten to top? Here my example-code: Chart Chart2 = new Chart(); List<object> allArrays = new List<object>(); allArrays.Add(new double[] { 446, 113, 7, 344 }); allArrays.Add(new double[] { 2, 4, 7, 12 }); allArrays.Add(new double[] { 100, 45, 1, 44 }); allArrays.Add(new double[] { 546, 213, 12, 444 }); allArrays.Add(new double[] { 2, 4, 7, 12 }); AxisY y0 = Chart2.Panes[0].Axes[0]; AxisY y1 = new AxisY(); Chart2.Panes[0].Axes.Add(y1); Chart2.Series.Add(new SeriesAttributes()); Chart2.Series.Add(new SeriesAttributes()); Chart2.Series[0].AxisY = y0; Chart2.Series[1].AxisY = y1; Chart2.Series[0].Pane = Chart2.Panes[0]; Chart2.Series[1].Pane = Chart2.Panes[0]; Chart2.Series[0].Text = "Series 0"; Chart2.Series[1].Text = "Series 1"; Chart2.Series[0].Gallery = Gallery.Bar; Chart2.Series[1].Gallery = Gallery.Area; FieldMap fieldMap1 = new FieldMap(); fieldMap1.Name = "Field1"; fieldMap1.Usage = FieldUsage.Value; FieldMap fieldMap2 = new FieldMap(); fieldMap2.Name = "Field2"; fieldMap2.Usage = FieldUsage.XValue; FieldMap fieldMap3 = new FieldMap(); fieldMap3.Name = "Field3"; fieldMap3.Usage = FieldUsage.FromValue; FieldMap fieldMap4 = new FieldMap(); fieldMap4.Name = "Field4"; fieldMap4.Usage = FieldUsage.Value; FieldMap fieldMap5 = new FieldMap(); fieldMap5.Name = "Field5"; fieldMap5.Usage = FieldUsage.XValue; Chart2.DataSourceSettings.Fields.Clear(); Chart2.DataSourceSettings.Fields.Add(fieldMap1); Chart2.DataSourceSettings.Fields.Add(fieldMap2); Chart2.DataSourceSettings.Fields.Add(fieldMap3); Chart2.DataSourceSettings.Fields.Add(fieldMap4); Chart2.DataSourceSettings.Fields.Add(fieldMap5); ListProvider DataProvider = new ListProvider(allArrays); Chart2.DataSource = DataProvider; StringWriter sw = new StringWriter(); HtmlTextWriter html = new HtmlTextWriter(sw); Chart2.RenderControl(html); Literal2.Text = sw.ToString(); Many thanks, Thorsten
×
×
  • Create New...