_chart = new LightningChart();
_chart.Margin = new Thickness(0, 30, 0, 0);
_chart.ColorTheme = ColorTheme.LightGray;
_chart.Foreground = Brushes.Black;
This is the code for applying the parallel coordinate chart color theme.
When set to light gray theme, the Y-axis text color is changed to white, so the Y-axis text is not visible.
How to change Y axis text color?
Is there a way to directly change the color to the desired color other than the color set in the theme?
Thank you for replying.
How to change the background color and font color of the parallel coordinate chart
Moderator: Queue Moderators
-
- Posts: 5
- Joined: Fri Jul 02, 2021 8:01 am
-
- Posts: 141
- Joined: Wed Mar 27, 2019 1:05 pm
Re: How to change the background color and font color of the parallel coordinate chart
Hello,
Almost every object in LightningChart has Color, Fill or some property similar to those. These allow you to modify the colors of an individual component. You don't need to use themes for this. In fact, when setting a color theme, it overrides all manual color changes done so far. Therefore, you should always set color theme (if you want to use it, it is not mandatory) before setting colors manually.
Various Y-axis related coloring settings can be found under chart.ViewXY.YAxes[0]. The property you are looking for is most likely Title.Color.
Best regards,
Lasse
Almost every object in LightningChart has Color, Fill or some property similar to those. These allow you to modify the colors of an individual component. You don't need to use themes for this. In fact, when setting a color theme, it overrides all manual color changes done so far. Therefore, you should always set color theme (if you want to use it, it is not mandatory) before setting colors manually.
Various Y-axis related coloring settings can be found under chart.ViewXY.YAxes[0]. The property you are looking for is most likely Title.Color.
Code: Select all
_chart.ViewXY.YAxes[0].AxisColor = Colors.Red;
_chart.ViewXY.YAxes[0].LabelsColor = Colors.Blue;
_chart.ViewXY.YAxes[0].Title.Color = Colors.Blue;
Lasse
-
- Posts: 5
- Joined: Fri Jul 02, 2021 8:01 am
Re: How to change the background color and font color of the parallel coordinate chart
AxisY axisYWeight = new AxisY(_chart.ViewXY);
axisYWeight.AxisColor = Colors.Gray;
axisYWeight.LabelsColor = Colors.Gray;
axisYWeight.Title.Color = Colors.Black;
axisYWeight.GridStripColor = Colors.Gray;
I corrected the Y-axis color, but only the grid part appears white.
axisYWeight.AxisColor = Colors.Gray;
axisYWeight.LabelsColor = Colors.Gray;
axisYWeight.Title.Color = Colors.Black;
axisYWeight.GridStripColor = Colors.Gray;
I corrected the Y-axis color, but only the grid part appears white.
-
- Posts: 141
- Joined: Wed Mar 27, 2019 1:05 pm
Re: How to change the background color and font color of the parallel coordinate chart
Hello,
There are a couple of more axis grid related coloring settings under MajorDivTickStyle and MajorGrid. There are respective settings for minor ticks and grid as well, but at least the latter are disabled by default (you can show/hide them via Visible property).
Again, if you are setting the ColorTheme somewhere in your code, be sure to change these axis coloring settings after that. Otherwise they will be overridden by the theme change.
Kind regards,
Lasse
There are a couple of more axis grid related coloring settings under MajorDivTickStyle and MajorGrid. There are respective settings for minor ticks and grid as well, but at least the latter are disabled by default (you can show/hide them via Visible property).
Code: Select all
_chart.ViewXY.YAxes[0].MajorDivTickStyle.Color = Colors.Blue;
_chart.ViewXY.YAxes[0].MajorGrid.Color = Colors.Blue;
_chart.ViewXY.YAxes[0].MinorDivTickStyle.Color = Colors.Blue;
_chart.ViewXY.YAxes[0].MinorGrid.Color = Colors.Blue;
Kind regards,
Lasse