According to http://docs.splunk.com/Documentation/WebFramework, "Charts support the same properties supported by the Splunk JSChart library", however I am unable to find the correct incantation to set 'charting.legend.placement' to 'bottom'.
Does anyone have an example of how to set this up?
I think you can just pass it as an option to the chart constructor:
var ChartView = require("splunkjs/mvc/chartview");
new ChartView({
id: "example-chart",
managerid: "example-search",
type: "line",
el: $("#mychart"),
"charting.legend.placement": "bottom"
}).render();
Or set it after the chart has been created:
splunkjs.mvc.Components.getInstance("example-chart").settings.set({
"charting.legend.placement": "bottom",
});
I think you can just pass it as an option to the chart constructor:
var ChartView = require("splunkjs/mvc/chartview");
new ChartView({
id: "example-chart",
managerid: "example-search",
type: "line",
el: $("#mychart"),
"charting.legend.placement": "bottom"
}).render();
Or set it after the chart has been created:
splunkjs.mvc.Components.getInstance("example-chart").settings.set({
"charting.legend.placement": "bottom",
});
Here you can find the possible values for charting.legend.*
: http://docs.splunk.com/Documentation/Splunk/5.0/Viz/CustomChartingConfig-ChartLegend#Legend
This worked - Thanks.
I had been hoping to have a django-bindings option, so that all the options were in one place.