Hi Team,
I want to create a column chart and a line chat in the same chart area and these two charts should be plotted on the same primary X axis and primary Y axis. (like Google Combo chart)
In ColumnLine Chart, the column data are plotted on primary X axis and primary Y axis and the Line data are plotted on secondary X axis and secondary Y axis. (Ref: attached image)
What parameters do i need to set on ColumnLine chart to render a chart like Google Combo Chart?
(Ref: Google Combo Chart) https://google-developers.appspot.com/chart/interactive/docs/gallery/combochart
Thanks in advance
Hello,
Thank you for using our community.
What I would like to suggest you is using a composite chart. This chart type can be used to combine an infinite number of chart types. In our online documentation you can find step by step guidance how to create and use a composite chart. You can use the Chart wizard to help you faster develop the desired chart. Here are some useful references:
Creating a Composite Chart
About the Composite Chart
Composite Chart Data Series Types Sample
Composite Chart Layers Samples
Composite Chart Legends Sample
If you have further questions regarding this matter don’t hesitate to contact us.
Hi Marina,
Now I am able to create a combo chart but I don't know, how to render a legend inside the chart area (Ref: attached image).
.aspx
<igchart:UltraChart ID="igChart" runat="server" Width="700px" Height="550px"> </igchart:UltraChart>
.cs
CompositeLegend myLegend = new CompositeLegend(); myLegend.ChartLayers.Add(columnLayer); myLegend.ChartLayers.Add(lineLayer); myLegend.Bounds = new System.Drawing.Rectangle(0, 75, 20, 25); myLegend.BoundsMeasureType = MeasureType.Percentage; myLegend.PE.ElementType = PaintElementType.Gradient; myLegend.PE.FillGradientStyle = GradientStyle.ForwardDiagonal; myLegend.PE.Fill = Color.CornflowerBlue; myLegend.PE.FillStopColor = Color.Transparent; myLegend.Border.CornerRadius = 10; myLegend.Border.Thickness = 0; igChart.CompositeChart.Legends.Add(myLegend);
What is wrong in my code? How to render a legend inside a chart area with data points?