Hi,
I need to implement a stacked column chart. I have done simple stacked column chart using webchart control.But now the one which I need to implement is not what I do in daily basis. So if anyone can guide me by providing a documentation or steps to do it. It will be also helpful if anyone can tell me the chart type.
I have attached the screen shot of the chart which I have to build.
Thanks,Sanjay
Check out this thread, there is a sample attached in there.
http://es.infragistics.com/community/forums/p/67117/340695.aspx#340695
Hi DmgInc
How can I have Y-axis values in millions?
Hi Bhadresh,
I have attached image here. If you notice the Y axis you will see the numbers. These numbers are in millions but it displays as if its in thousands. 0, 500, 1000, 1500 and so on.I want to achieve this. I'm not sure How I can achieve this.
Also if you see on the image we have vertical text saying in Millions(US$) how will I do that?
Thanks for helping me out.
Sanjay
I can help you with the text.
ultraChart1.TitleLeft.Text = "In Millions (US$)"; ultraChart1.TitleLeft.Orientation = TextOrientation.VerticalLeftFacing; ultraChart1.TitleLeft.HorizontalAlign = StringAlignment.Center; ultraChart1.TitleLeft.Visible = true;
Lucas
Also if you want your numbers to be in the thousands, can't you just take your data that is in the millions and do the division yourself? So take all your #s and just divide them by 1000 before you place them in the chart.
Thanks for your response regarding the text.
As far as the data concern when you hover over the bars the tool tip should display data in millions only so if I divide them by any number then the tool tip will display divided data not actaul one.
See this thread : http://es.infragistics.com/community/forums/p/51901/271378.aspx#271378
You will need to change the links to the DOCs though, just replace "2010.3" to "2012.1" in any of the help links and they will load.
Hello Sanjay,
Yes, the solution provided above shows you how to customize label using IRenderLabel and tooltip will show you correct number. The code will be something like below:
this.UltraChart1.Axis.Y.Labels.ItemFormatString = "<MY_VALUE>"; Hashtable MyLabelHashTable = new Hashtable(); MyLabelHashTable.Add("MY_VALUE", new MyLabelRenderer()); this.UltraChart1.LabelHash = MyLabelHashTable;
public class MyLabelRenderer : IRenderLabel { public string ToString(Hashtable context) { double dataValue = (double)context["DATA_VALUE"]; if (dataValue >0) { return (dataValue / 1000).ToString(); } return dataValue.ToString() + " [Negative]"; } }
You can change the return value based on your requirement.
I hope this helps.