I have a pie chart with 2 colors in pie chart like
Green is for reporting and red is for non-reporting .
I have a trending chart with same condition with green and red colors.
Please provide a solution to get same color code for both .
Need a quick action here friends..
Use charting.fieldColors with hex color code to set the colors of two field values Green and Red. You should also define same colors in charting.seriesColors which uses one of the defined colors first before applying dynamic colors to the series in chart (provided number of series in chart are more than no of seriesColors defined). You can apply these to all types of charts.
With pie chart you have to ensure that both Green and Red fields are always present (i.e. they should be zero and not null). Otherwise the chart will pick dynamic colors instead of fieldColors defined.
Refer to Chart Configuration Splunk documentation on the above two fields: http://docs.splunk.com/Documentation/Splunk/latest/Viz/ChartConfigurationReference
Use charting.fieldColors with hex color code to set the colors of two field values Green and Red. You should also define same colors in charting.seriesColors which uses one of the defined colors first before applying dynamic colors to the series in chart (provided number of series in chart are more than no of seriesColors defined). You can apply these to all types of charts.
With pie chart you have to ensure that both Green and Red fields are always present (i.e. they should be zero and not null). Otherwise the chart will pick dynamic colors instead of fieldColors defined.
Refer to Chart Configuration Splunk documentation on the above two fields: http://docs.splunk.com/Documentation/Splunk/latest/Viz/ChartConfigurationReference
when i used the legend labels are duplicating twice ...
its show like reporting,not reporting,reporting% again not reporting %.
I need only reporting and not reporting with %
Please suggesst
While this is separate than the original issue posted. I think you are looking for
charting.chart.showLabels and not legends. Please check and confirm.
Hi,
my requirement is like both the pie chart and trending chart(timechart ) should have same colors .I have green and red in pie chart for reporting and not reporting . but getting blue and red for reporting and not reporting.
Please suggest a way..
Can you share the chart options code for both Line Chart and Pie Chart?
Also try changing from Red Green to some other colors like brown purple for both charting.fieldColors and charting.seriesColors for both the charts.
Can you tell whether the Pie chart loads with first set of colors and then changes or not?
Refer to charting.legend.masterLegend property so that it disables legend color synchronization with other dashabord panels. That way pie chart colors might not get overridden from those defined in charting.fieldColors and charting.seriesColors.
Code snippet of all chart options would be useful to assist.