I have a bar chart created in the which I am showing data values above the bars. However, the tallest bar has the text inside of it, and the colors blend too much. In simple XML, can I change the color of the text to darken it?
EDITED
Since you want to make changes to column data labels which are highchart-data-labels elements not exposed by charting properties like charting.fontColor you can try one of the following options:
1) Option 1 - charting.backgroundColor
Without CSS make column chart Data Labels prominent by changing chart color to contrast
cyan
Pros - No need to modify through css.
Cons - Panel might look ugly. (White or Black background colors usually suits dashboards)
2) Option 2 - Through CSS
(i) Override the highcharts-data-label text color to the color of your choice using following css custom_highcharts.css.
/* SVG Highcharts Data Labels color overridden to blue*/
g.highcharts-data-labels text {
fill: blue !important;
}
(ii) Place the CSS under your Splunk App folder -
$SPLUNK_HOME\etc\apps\<yourAppName>\appserver\static
PS:
- If you have not put any static files for your Splunk App you would need to create appserver\static folder yourself
- If you do not have access to manually place the CSS file to specific Splunk folder, you can load the same through Manage App Edit Properties using Upload asset feature.
(iii) Include the CSS file in your dashboard/form
<form stylesheet="custom_highcharts.css">
(iv) Restart Splunk (splunkd) and clear browser cache for the changes to take place.
Can you please try this option and see if it works out for your version of Splunk:
<!-- Set font color (axis labels, legends) -->
<option name="charting.fontColor">#FFDDCC</option>
Use the hex code of your choice in it.
Hi Team,
could some one please suggest on changing the data label color in bar chart . changing the font color of data label 192.
Actually did this well before your comment. Changed axis labels and legend labels, but not values
Thanks this worked for me
This is the text I want to change. The options you mention only change the colors of the bars.
Actually did this well before your comment. Changed axis labels and legend labels, but not values
no luck for this!
i want to change the value of the data label can any one helm me on this
EDITED
Since you want to make changes to column data labels which are highchart-data-labels elements not exposed by charting properties like charting.fontColor you can try one of the following options:
1) Option 1 - charting.backgroundColor
Without CSS make column chart Data Labels prominent by changing chart color to contrast
cyan
Pros - No need to modify through css.
Cons - Panel might look ugly. (White or Black background colors usually suits dashboards)
2) Option 2 - Through CSS
(i) Override the highcharts-data-label text color to the color of your choice using following css custom_highcharts.css.
/* SVG Highcharts Data Labels color overridden to blue*/
g.highcharts-data-labels text {
fill: blue !important;
}
(ii) Place the CSS under your Splunk App folder -
$SPLUNK_HOME\etc\apps\<yourAppName>\appserver\static
PS:
- If you have not put any static files for your Splunk App you would need to create appserver\static folder yourself
- If you do not have access to manually place the CSS file to specific Splunk folder, you can load the same through Manage App Edit Properties using Upload asset feature.
(iii) Include the CSS file in your dashboard/form
<form stylesheet="custom_highcharts.css">
(iv) Restart Splunk (splunkd) and clear browser cache for the changes to take place.
If CSS is my only viable option, so be it!
I am certain that CSS will work, but was looking for other solutions due to admin limitations. Thanks!
@feickertmd Can you please check and confirm whether the following solution worked for you or not?