What I am trying to achieve is to colour the Y axis in red color from -inf to 0, and green color from 0 to +inf.
I have done this so far, using a dummy series to set the color ranges, and assign it to the axis. Maybe there is a way of assigning a palette to the bar directly?
Code: Select all
PointLineSeries colorSeries = new PointLineSeries();
ValueRangePalette palette = new ValueRangePalette(colorSeries);
palette.Type = PaletteType.Uniform;
palette.MinValue = 1;
palette.Steps.Add(new PaletteStep(palette, Color.Red, 0));
palette.Steps.Add(new PaletteStep(palette, Color.Green, 10000));
colorSeries.UsePalette = true;
AxisY.PaletteSeries = colorSeries;
Could someone please advise on this?
Thanks.