Spotfire ScatterPlot Set Color By Category (C#, IronPython)

             var coloring = scatterPlot.ColorAxis.Coloring;

            coloring.Clear();

            coloring.DefaultColor = Color.White;

            var categoricalColorRule = coloring.AddCategoricalColorRule();

            var colorKeys = categoricalColorRule.GetExplicitCategories();

            scatterPlot.ColorAxis.Coloring.SetColorForCategory(colorKeys[0], Color.ForestGreen);

            scatterPlot.ColorAxis.Coloring.SetColorForCategory(colorKeys[1], Color.Blue);

            scatterPlot.ColorAxis.Coloring.SetColorForCategory(colorKeys[2], Color.Orange);




Comments

Popular posts from this blog

WPF How to Dispose ViewModel when the associated UserControl (Not Window) closes?

C# How to unit test Dispatcher

WPF: How to Deep Copy WPF object (e.g. UIElement) ?