If you see in the legend, the legend color code is all dotted. How can I make it a pretty, colorful legend? Thanks! I dumped the code below too, there's not too much of it.
Code: Select all
this.chart = new Arction.WinForms.Charting.LightningChartUltimate(LightningChartUltimate);
chart.BeginUpdate();
try
{
this.chart.Name = "chart";
chart.Dock = DockStyle.Fill;
this.chart.Options.ShowDebugData = false;
this.chart.ColorTheme = ColorTheme.SkyBlue;
this.Controls.Add(this.chart);
chart.Name = "Point cloud chart";
series = new SurfaceMeshSeries3D(chart.View3D, Axis3DBinding.Primary, Axis3DBinding.Primary, Axis3DBinding.Primary);
chart.View3D.SurfaceMeshSeries3D.Add(series);
chart.ActiveView = ActiveView.View3D;
series.ColorSaturation = 100;
series.WireframeType = SurfaceWireframeType3D.DotsPalettedByValue;
series.ContourLineType = ContourLineType3D.None;
series.Fill = SurfaceFillStyle.None;
series.ContourLineType = ContourLineType3D.None;
series.ContourPalette = CreatePalette(series);
this.series.Clear();
}
finally
{
chart.EndUpdate();
}
Code: Select all
/// <summary>
/// Create palette.
/// </summary>
/// <param name="ownerSeries">palette owner</param>
/// <returns>ValueRangePalette</returns>
private ValueRangePalette CreatePalette(SeriesBase3D ownerSeries)
{
ValueRangePalette palette = new ValueRangePalette(ownerSeries);
Color[] colors = new Color[] { Color.Blue, Color.Teal, Color.Green, Color.Yellow, Color.Red };
var palletList = new List<PaletteStep>();
colors.Select((c, i) => new PaletteStep() { Color = colors[i], MaxValue = 255.0 / (float)colors.Length * (i + 1) });
series.ContourPalette.Steps = palletList;
series.ContourPalette.Type = PaletteType.Gradient;
series.ContourPalette.MinValue = 0;
return palette;
}