Profile Picture

Cannot change pattern of major grid lines for SecondaryY axis

Posted By Mikhail Kazakov 11 Years Ago

Cannot change pattern of major grid lines for SecondaryY axis

Author
Message
Mikhail Kazakov
Posted 11 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: Forum Members
Last Active: 11 Years Ago
Posts: 2, Visits: 1
Hello,

It seems that setting NScaleConfigurator.MajorGridStyle.LineStyle.Pattern property for the "SecondaryY" axis does not work. Changing other properties, like NScaleConfigurator.MajorGridStyle.LineStyle.Color, works as expected. Also, the Pattern property behaves fine for the "PrimaryY" axis.

Is this a bug? Is there a way to make it work?

The following code snippet can be used to reproduce the behavior.


var chart = new NCartesianChart
{
BoundsMode = BoundsMode.Stretch,
Dock = DockStyle.Fill,
ContentAlignment = ContentAlignment.MiddleCenter,
Margins = new NMarginsL(5, 5, 5, 5)
};
nChartControl1.Charts.Add(chart);

chart.Axis(StandardAxis.PrimaryX).ScaleConfigurator = new NRangeTimelineScaleConfigurator
{
AutoDateTimeUnits = new NDateTimeUnit[] { NDateTimeUnit.Year, NDateTimeUnit.Month }
};

chart.Axis(StandardAxis.PrimaryY).Visible = false;

var yAxis = chart.Axis(StandardAxis.SecondaryY);
yAxis.Visible = true;
yAxis.ScaleConfigurator.MajorGridStyle.LineStyle.Pattern = LinePattern.Dash;

var line = (NLineSeries)chart.Series.Add(SeriesType.Line);
line.Values.FillRandom(new Random(), 8);
line.DisplayOnAxis(StandardAxis.SecondaryY, true);


Thanks,
Mikhail




Similar Topics


Reading This Topic