Base view class
Description
The base view class used for Splunk views. This class is not designed to be subclassed. Extend SimpleSplunkView instead.
Library path
splunkjs/mvc/basesplunkview
Properties common to all views
Name | Default value | Description |
id | | Required. The unique ID for this control. |
managerid | null | The ID of the search manager to bind this view to. |
settings | | The properties of the view. See the methods below to get and set values. |
Methods common to all views
Name | Description |
render | Draws the control to the screen. Called on newly-constructed views for the view to be in a defined state. Called only when you create the view manually. |
settings.get( property ) | Returns the value of property for the current component. |
settings.set( property, value ) | Sets the value of property to the specified value for the current component. |
Example constructor
require([
"splunkjs/mvc/chartview",
"splunkjs/mvc/simplexml/ready!"
], function(ChartView) {
var mychart = new ChartView ({
id: "chart1",
managerid: "search1",
type: "bar",
el: $("#mychart")
}).render();
});