Hi!
I have a dashboard with 20 rows and 1 column. I really like the legend on the right but the chart buckets don't line up when some of the fields have short values. If i put the legend on the bottom, the chart buckets line up but it doesn't look as good with the legend on the right.
The only work around i can think of is make a macro with an eval statement that adds a bunch of spaces to the right of fields in the timechart so it puts spaces to the right of the value and pushes it over to the left so the chart buckets line up vertically.
That's probably a ridiculous solution so I'd figured I'd ask here!
You can control the legend width using the charting properties, but I'm afraid it will only work for the FlashChart module, not for the newer JSChart module. It's not directly documented under the "Chart and Legend" properties, but it says that the Legend is a "TextBlock" and therefore has all the properties of TextBlocks, which are listed here - http://docs.splunk.com/Documentation/Splunk/6.1.1/AdvancedDev/AdvChartingConfig-TextblockLayoutsprit... Among which are maximumWidth and minimumWidth.
As to why it doesn't work in JSChart, I think it's a pretty general state of affairs, in that there are quite a lot of FlashChart charting keys that JSChart still doesn't support.
But switch to FlashChart and put this ValueSetter module upstream from your FlashChart module and all the legends will be exactly 200px wide.
<module name="ValueSetter">
<param name="arg.charting.legend.labelStyle.maximumWidth">200</param>
<param name="arg.charting.legend.labelStyle.minimumWidth">200</param>
You can control the legend width using the charting properties, but I'm afraid it will only work for the FlashChart module, not for the newer JSChart module. It's not directly documented under the "Chart and Legend" properties, but it says that the Legend is a "TextBlock" and therefore has all the properties of TextBlocks, which are listed here - http://docs.splunk.com/Documentation/Splunk/6.1.1/AdvancedDev/AdvChartingConfig-TextblockLayoutsprit... Among which are maximumWidth and minimumWidth.
As to why it doesn't work in JSChart, I think it's a pretty general state of affairs, in that there are quite a lot of FlashChart charting keys that JSChart still doesn't support.
But switch to FlashChart and put this ValueSetter module upstream from your FlashChart module and all the legends will be exactly 200px wide.
<module name="ValueSetter">
<param name="arg.charting.legend.labelStyle.maximumWidth">200</param>
<param name="arg.charting.legend.labelStyle.minimumWidth">200</param>
It didn't work for me as a ValueSetter module, but I got it work using these params in HiddenChartFormatter (with FlashChart):
<param name="charting.legend.labelStyle.maximumWidth">200</param>
<param name="charting.legend.labelStyle.minimumWidth">200</param>
Thanks. Wish this worked with JSChart... flashchart doesn't work on my phone.