The datastore object that contains the data for this chart
The id of the div element or the element itself to house the chart
The config describing the chart
Optional_tooltipOptionalextra_OptionalsettingsOptionalunpinStatictypesAdds a listener to the datastore that will be called when an event occurs, passing the event type and any data. There are the following different types of event:-
a unique id indetifying the listener
a function that accepts two paramaters, the type of event and the data associated with it
Adds a menu icon with tooltip to the title bar
the css classs of the icon (space delimited).
the tooltip text
extra inormation about the icon/tooltip
Optionalfunc?: (e: MouseEvent) => voida function that is called when the icon is clicked
Optionalposition?: stringthe position of the tooltip.
Optionalsize?: stringthe size of the tooltip
OptionaladdOptionalcolorOptionalcolorOptionalgetOptionaldata: anyOptionalgetReturns information about which controls to add to the settings dialog. Subclasses should call this method and then add their own controls e.g.
getSettings(){
let settings = super.getSettings();
return settings.concat([{
label:"A value"
type:"slider",
default_value:this.config.value,
max:10,
min:10,
func:x=>{
this.config.value=x;
//update chart
}
}]);
}
wrapping controls with a call to @{link g} will perform type checking
todo- specifiy the link to g above properly/ document better
an array of objects describing tweakable parameters
Check if chart is composed of any columns whose data has changed. if so re-calculate and re-draw chart (call onDataFiltered)
a list of column/fields whose data has been modified
OptionalpinOptionalremoveSets the size of the graph. If no parameters are supplied then the graph will be resized based on it container. Subclasses should overide this, but call the super method first which will calculate width and height of the content div
Optionalx: numberThe new width
Optionaly: numberThe new height;
Optionalunpin
The base constructor