Hello,
Is it possible to have a Stack Column Chart area and a Column Chart area in the same chart? For example if I had a series of number (1, 10, 20) for 1/1/2011, which I would want to be displayed as a Stack Colum Chart and I had another of series which has the one number ( 2) for 1/1/2011, which I would want to be displayed as a Column chart. Could I do this?
Thanks
Dave McNulty
Hi Dave,
Thank you for posting in the community.
To answer your question, yes, you should be able to have 2 areas in a composite chart with a StackColumnChart and a Column chart. In the composite chart designer you can define multiple series collections. Subsequently, in the Chart Layer tab, you can set the respective area for each chart you want to use and the series which each chart should consume.
Here is also a sample from our collection demonstrating a multi area composite chart:
http://samples.infragistics.com/aspnet/Samples/WebCharts/Display/Composite-Charting/Chart-Layers/Default.aspx?cn=chart&sid=796fcc98-59a7-43e3-925f-0e1ad50602da
Please let me know if this helps.
Please feel free to contact me if you need further assistance with this matter.
Thank you for your reply.
I am attaching a simple sample illustrating how a StackColumn and a Column chart may be used together in a Composite chart. Note that in such implementation some overlapping occus (however from what I understand here this is the desired functionality).
You may find useful info regardin creating and setting up a composite chart at:
http://help.infragistics.com/Help/NetAdvantage/ASPNET/2011.2/CLR4.0/html/Chart_Creating_a_Composite_Chart_in_Code_Part_1_of_2.html
http://help.infragistics.com/Help/NetAdvantage/ASPNET/2011.2/CLR4.0/html/Chart_Creating_a_Composite_Chart_in_Code_Part_2_of_2.html
Please feel free to contact me if you have any questions.
Please feel free to contact me if you need further assistance regarding this scenario.
Hi Petav,
That's not I want either, maybe I can use a picture:
Is this possible?
Achieving the layout as per your requirement is possible by modifying the column boxes in the FillSceneGraph handler. In this case, however, for each box drawn, its series (and possibly datapoint value) need to be modified. Attached is my modified sample illustrating such a setup.
Below is a sample implementation for the FillSceneGraph handler:
protected void UltraChart1_FillSceneGraph(object sender, Infragistics.UltraChart.Shared.Events.FillSceneGraphEventArgs e) { foreach (Primitive p in e.SceneGraph) { Box box = p as Box; if (box != null) { if (box.Series != null) { if (box.Series.Label == "Series 1") { box.rect.Width = box.rect.Width / 2; } else if (box.Series.Label == "Series 2") { box.rect.Width = box.rect.Width / 2; box.rect.X = box.rect.X + box.rect.Width ; box.PE.Fill = Color.Red; } } } } }
Please do not hesitate to contact me if you need further assistance.