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
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.
See this thread : http://ko.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.
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.
Sanjay
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.
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