Graph options
jsGraph allows you to affect some general behaviour or rendering of the graph by passing the option
parameter to the graph constructor. We describe herein the available options
Param | Description |
---|---|
title |
The title of your graph. The title is automatically displayed on the top of the drawing zone. |
paddingTop paddingBottom paddingLeft paddingRight
|
This is the allowed padding between the boundaries of the SVG and the outer part of the nearest axis. The ticks and labels of the relevant axis are not included in the paddings. If there is no axis on this side of the graph, the padding represents the distance to the drawing zone. |
close |
Allows you to draw lines that replace the axis (in case there is none) for each side of the drawing zone. Example: { top: true, bottom: true, right: false, left: true } |
fontSize |
The font size (in px) that is used as a reference for the whole graph. It should be an integer. |
fontFamily |
The font family to be used in the graph (just like a CSS font-family) |
plugins |
An hasmap of plugins to be loaded. For built-in plugins, the keys are the plugin names and the values the plugins parameters. Example: { 'graph.plugin.zoom': { zoomMode: 'x' }, 'graph.plugin.drag': {} } For custom plugins, use the key to indicate the path to your plugin file. |
pluginActions |
An hashmap of mouse actions triggering plugins. The key is the plugin name and the value is a combination of shift, ctrl, meta of keycodes. This is used to controll the access of mousedown, mousemove and mouseup events. Example: { 'graph.plugin.drag': { shift: true, ctrl: false } } |
wheel |
Defines the default mousewheel action. For further details, read the Mouse interactions section. |
dblclick |
Defines the default double-click action. For further details, read the Mouse interactions section. |
series |
In case you are working with the development files, use this option to preload the series file that your application needs. Example: [ 'line', 'zone', 'scatter' ] |
dynamicDependencies |
Use this option if you want to change the folders in which the plugins, series and shapes files are located. Warning ! Changing these options will make the build task in the gruntfile fail. |