Spotfire: How to set Combination Chart Series color? IronPython C#
combinationChart.ColorAxis.Coloring.Clear();
var categories = combinationChart.ColorAxis.Coloring.AddCategoricalColorRule().GetExplicitCategories();
foreach (var categoryKey in categories)
{
// Your business rules here ...
if(categoryKey.ToString().Contains("completion"))
combinationChart.ColorAxis.Coloring.SetColorForCategory(categoryKey, ColorTranslator.FromHtml("#17295f"));
else if(categoryKey.ToString().Contains("location"))
combinationChart.ColorAxis.Coloring.SetColorForCategory(categoryKey, ColorTranslator.FromHtml("#f51908"));
else
combinationChart.ColorAxis.Coloring.SetColorForCategory(categoryKey, ColorTranslator.FromHtml("#232323"));
}
Comments
Post a Comment