Page 1 of 1

Chart axis values with unit

Posted: Wed Oct 17, 2012 6:46 am
by stiuser
Hi
I am using charts in my report. I need to display the unit with x axis and y axis values, like x axis values={100 cm, 200 cm, 300 cm} and y axis value={45kg, 23 kg, 85 kg}. Can anybody help me on this please?

Re: Chart axis values with unit

Posted: Wed Oct 17, 2012 12:23 pm
by HighAley
Hello.

Please, watch the How to Create Report with Charts videos on our site. http://www.stimulsoft.com/en/videos It will help you.
Let us know if you will need any additional help.

Thank you.

Re: Chart axis values with unit

Posted: Thu Oct 18, 2012 8:16 am
by stiuser
Hi,
I have checked all the videos. But I didn't get a solution for my requirement. I need to set units for X-Axis and Y Axis values(value + some space + unit. E.g. 100 Kg).
I found that we can achieve this by setting the unit in Chart->properties->Area->Y- axis->Labels->Text After.

I have placed this chart in a data band. So we can expect more than one chart in a report. The units may differ from chart to chart. So I cannot set a fixed value to "Text After". I have the Unit column in Data source. But I don’t know how to bind this value to the Text After property. Please help me.

Re: Chart axis values with unit

Posted: Thu Oct 18, 2012 2:07 pm
by HighAley
Hello.

If you need to change the Text After property in each Chart which is on the Band then you could do it in the Before Print event of the Band with next code:

Code: Select all

this.Chart1_Area.YAxis.Labels.TextAfter = " " + Line;
Thank you.

Re: Chart axis values with unit

Posted: Fri Oct 19, 2012 4:36 am
by stiuser
Hi Aleksey,

Thank you very much for your reply. My issue solved.

Thank you very much.

Re: Chart axis values with unit

Posted: Fri Oct 19, 2012 12:19 pm
by HighAley
Hello.

We are always glad to help you.
Let us know if you need any additional help.

Thank you.