I would like to know if this in particular is possible. I have a chart with an Y axis. In the axis units, if the value is greater than zero, I would like to draw the axis units using a specific color (eg: white), and if the axis units value is less than zero, I would like the units to have a different color (eg: red). Is this possible using only one Y axis?
Thanks
Customize axis units text
Moderator: Queue Moderators
- ArctionPasi
- Posts: 1367
- Joined: Tue Mar 26, 2013 10:57 pm
- Location: Finland
- Contact:
Re: Customize axis units text
Axis bar color can be changed with a palette:
But the ticks and labels are not colored.
CustomAxisTicks support individual coloring of ticks and grid lines. Labels are not colored though.
If labels coloring is a requirement, please contact our sales and mention this as condition in Purchase Order of licenses. I'm sure our team can add some kind of event or callback method to color the labels by value.
But the ticks and labels are not colored.
CustomAxisTicks support individual coloring of ticks and grid lines. Labels are not colored though.
If labels coloring is a requirement, please contact our sales and mention this as condition in Purchase Order of licenses. I'm sure our team can add some kind of event or callback method to color the labels by value.
LightningChart Support Team, PT
Re: Customize axis units text
Thanks for the answer. I will let you know if this would be important for us.
Also, could you please let me know if I can somehow modify the label text? I would like for example to prepend the dollar symbol to every label in the Y axis, or add a comma to indicate the thousands. Would this be possible? I had a look at the examples but couldn't find anything similar.
Also, could you please let me know if I can somehow modify the label text? I would like for example to prepend the dollar symbol to every label in the Y axis, or add a comma to indicate the thousands. Would this be possible? I had a look at the examples but couldn't find anything similar.
- ArctionPasi
- Posts: 1367
- Joined: Tue Mar 26, 2013 10:57 pm
- Location: Finland
- Contact:
Re: Customize axis units text
Axis.AutoFormatLabels = False
Axis.LabelsNumberFormat = .... use normal formatting string here, same as you would use to Double.ToString() method. Almost. if you specify .ffffff it will show more decimals than .NET normally would.
Axis.LabelsNumberFormat = .... use normal formatting string here, same as you would use to Double.ToString() method. Almost. if you specify .ffffff it will show more decimals than .NET normally would.
LightningChart Support Team, PT
Re: Customize axis units text
The currency formatting worked very well. Thanks.
Chart.ViewXY.YAxes[0].LabelsNumberFormat = "C";
Chart.ViewXY.YAxes[0].LabelsNumberFormat = "C";