I am using OWC 11 in my new web application for displaying charts.
Is it possible in OWC 11 to combine and display a column and a line graph (Looking like they overlap each other)?
I tried it using this code but it doesn' t work.
If you have any solution, please reply to this thread. Thanks in advance.
Is it possible in OWC 11 to combine and display a column and a line graph (Looking like they overlap each other)?
I tried it using this code but it doesn' t work.
Code:
int width = 400; int height = 300; Bitmap bmpChart = new Bitmap(width, height, PixelFormat.Format16bppRgb555); OWC11.ChartSpace chSpace = new ChartSpaceClass(); ChChart chart = chSpace.Charts.Add(0); chart.SeriesCollection.Add(0); chart.SeriesCollection[0].Type = ChartChartTypeEnum.chChartTypeColumn3D; // Series names chart.SeriesCollection[0].SetData(ChartDimensionsEnum.chDimSeriesNames, Convert.ToInt32(ChartSpecialDataSourcesEnum.chDataLiteral), "test"); chart.SeriesCollection[0].SetData(ChartDimensionsEnum.chDimCategories, Convert.ToInt32(ChartSpecialDataSourcesEnum.chDataLiteral), "a,b,c"); chart.SeriesCollection[0].SetData(ChartDimensionsEnum.chDimValues, Convert.ToInt32(ChartSpecialDataSourcesEnum.chDataLiteral), "5,10,15"); chart.SeriesCollection.Add(1); // series collection xbar chart.SeriesCollection[1].Type = ChartChartTypeEnum.chChartTypeLine; chart.SeriesCollection[1].Marker.Size = 6; // marker size chart.SeriesCollection[1].Interior.Color = "Red"; // marker color chart.SeriesCollection[1].Marker.Style = ChartMarkerStyleEnum.chMarkerStyleCircle; // marker style chart.SeriesCollection[1].Line.Color = "Red"; // Set line weight. chart.SeriesCollection[1].Line.set_Weight((LineWeightEnum)int.Parse("3")); // Series names chart.SeriesCollection[1].SetData(ChartDimensionsEnum.chDimSeriesNames, Convert.ToInt32(ChartSpecialDataSourcesEnum.chDataLiteral), "test"); chart.SeriesCollection[1].SetData(ChartDimensionsEnum.chDimCategories, Convert.ToInt32(ChartSpecialDataSourcesEnum.chDataLiteral), "a,b,c"); chart.SeriesCollection[1].SetData(ChartDimensionsEnum.chDimValues, Convert.ToInt32(ChartSpecialDataSourcesEnum.chDataLiteral), "20,25,30"); chart.HasLegend = true; chart.Legend.Position = ChartLegendPositionEnum.chLegendPositionRight; chart.Axes[0].Orientation = Convert.ToInt32(OWC11.ChartLabelOrientationEnum.chLabelOrientationHorizontal); return chSpace;
Comment