Hi All,
I have a NChartControl that has 3 NCharts. The NCharts are configured as a horizontal bar graphs with multiple bar and line series.
(I attemped to insert a screen grab of the chart with no success so maybe the attachment worked)
The left axis (PrimaryX) is for data displayed as bars. The top axis (SecondaryY) is for data displayed as a line and the bottom (PrimaryY) axis of course goes with the amplitude of the bars.
The image is from a test program with the two color selectors being used to select the color of the scale labels and title.
Seems simple enough but here is the problem:
If I change the color of the top color selector (which should affect only the top scale) all the scales change color except the title of the bottom scale.
I attached a NChartCommandBar to the chart control to see if I could control the colors properly with it but it also acts very strange. I haven't totally established the pattern yet but it doesn't change the label and title colors correctly. It appears the axes are connected in some fashion but not directly since not everything changes on an axis (labels and title color) at the same time.
Here is a snippet of code I use to change the the color of the labels and title of the SecondaryY axis.
for (int iChart = 0; iChart < argChartControl.Charts.Count; iChart++)
{
NChart locChart = argChartControl.Charts[iChart];
NLinearScaleConfigurator chartScale = (NLinearScaleConfigurator)locChart.Axis(StandardAxis.SecondaryY).ScaleConfigurator;
NScaleLabelStyle itemLabelStyle = chartScale.LabelStyle;
NTextStyle itemLabelTextStyle = itemLabelStyle.TextStyle;
NColorFillStyle itemLabelFillStyle = new NColorFillStyle(argItemLabelColor);
itemLabelTextStyle.FillStyle = itemLabelFillStyle;
itemLabelStyle.TextStyle = itemLabelTextStyle;
chartScale.LabelStyle = itemLabelStyle;
chartScale.Title.TextStyle.FillStyle = itemLabelFillStyle;
if (argRefresh) locChart.Refresh();
}
Any help would be appreciated.
Thanks,
Lou