Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4
I have attached a screen shot of one of my charts. Notice that one of the bars describes a negative number. How do I make it so the X axis is always zero and a negative number will go below and a positive number will be above? Also - notice the numbers on the bars, how can I format that string?
Thanks!
Hello again,
Some of the properties for Y axis are:
ultraChart1.Axis.Y.RangeType = AxisRangeType.Custom;
ultraChart1.Axis.Y.RangeMin = -100;
ultraChart1.Axis.Y.RangeMax = 100;
ultraChart1.Axis.Y.DataType = AxisDataType.Numeric;
ultraChart1.Axis.Y.Labels.ItemFormatString = "<DATA_VALUE:##.##>";
ultraChart1.Axis.Y.OrientationType = AxisNumber.Y_Axis;
ChartTextAppearance cta = new ChartTextAppearance();
cta.ChartTextFont = new System.Drawing.Font("Arial", 7F);
cta.Column = -2;
cta.VerticalAlign = StringAlignment.Far;
cta.ItemFormatString = "<DATA_VALUE:00.00>";
cta.Row = -2;
cta.Visible = true;
ColumnChartAppearance cca = new ColumnChartAppearance();
cca.ChartText.Add(cta);
this.ultraChart1.ColumnChart = cca;
Please let me know if you have any further questions.
Regards
Great, Thanks - what is the property to show the range as labels on the Y axis? Aside from that, your code works for me well.
Hello Elondon,
Maybe one possible approach to achieve desire behavior is to use ChartTextAppearance and ColumnChartAppearance clasess. Please take a look at the modification that I made in your sample posted at http://community.infragistics.com/forums/t/61665.aspx
elondon said:how can I format that string
You could use the property ItemFormatString = "<DATA_VALUE:00.00>"; from your ChartTextAppearance. Please take a look at the notes that I include in the code. Please let me know if you have any questions