Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
530
xamdataChart intervals
posted

I am trying to add some intervals to my charts, linechart and scatter chart. 

I am pretty happy, with the automatic intervals when I didn't specify the number 

But I want to add some lines between the intervals without any label. Something like this. (Red lines) 

var series = new ScatterAreaSeries();
series.ItemsSource = dataPointCollection;
series.XMemberPath = nameof(DataPoint3D.X);
series.YMemberPath = nameof(DataPoint3D.Y);
series.ColorMemberPath = nameof(DataPoint3D.Z);

series.Name = "ScatterAreaSeries";
var colorScale = new CustomPaletteColorScale();
colorScale.InterpolationMode = ColorScaleInterpolationMode.InterpolateHSV;
colorScale.Palette.Add(Color.FromArgb(90, 0, 0, 255)); 
colorScale.Palette.Add(Colors.Green);
colorScale.Palette.Add(Colors.GreenYellow);
colorScale.Palette.Add(Colors.Yellow);
colorScale.Palette.Add(Colors.Orange);
colorScale.Palette.Add(Colors.OrangeRed);
colorScale.Palette.Add(Colors.Red);
series.ColorScale = colorScale;

series.Title = dataPointCollection.Name;
series.XAxis = xAxis;
series.YAxis = yAxis;
series.XAxis.MinorInterval = 1;
series.YAxis.MinorInterval = 1;
series.XAxis.MinorStrokeThickness = 1;
series.YAxis.MinorStrokeThickness = 3;

dataChart.Series.Add(series);

I tried adding MinorInterval and MinorStrokeThickness to my scatterchart and linechart, but it seems not working. 

How can I add more intervals(without any label) to my scatter and line charts ? 

Parents
No Data
Reply
  • 7535
    Offline posted

    Hello Guray,

    Thank you for contacting. You can get this behavior by setting the 'MinorStroke' brush off the Axis. Like this:

     xAxis.MinorStroke =  new SolidColorBrush { Color = Color.FromRgb(255, 0, 0) };

    Let me know if you have any question.

    Regards,

Children
No Data