Name | Description | ||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
jQuery Functions | |||||||||||||||||||||||||||||||||
insertFusionCharts(chartConfigurations: Object) |
Renders charts inside HTML elements. The HTML elements have to be selected using jQuery selector. In case, multiple HTML elements are selected using the jQuery selector, a chart will be rendered inside each selected HTML element. All existing elements inside the selected elements will be replaced by the rendered charts. This method returns the jQuery selected element to allow chaining with other jQuery methods.
An object of chart configurations (set of key, value pairs) can be passed as parameter. Click here to view complete list of chart configurations. |
||||||||||||||||||||||||||||||||
appendFusionCharts(chartConfigurations: Object) |
Renders charts at the end of selected HTML elements. The HTML elements need to be selected using jQuery selector. In case multiple HTML elements are selected, chart will be rendered inside each selected HTML element. All existing elements inside the selected elements will be preserved. The method returns the original jQuery selection to allow chaining of other jQuery methods.
An object of chart configurations (set of key, value pairs) can be passed as parameter. Click here to view complete list of chart configurations. |
||||||||||||||||||||||||||||||||
prependFusionCharts(chartConfigurations: Object) |
Renders and inserts charts at the beginning of selected HTML elements. The HTML elements need to be selected using jQuery selector. In case multiple HTML elements are selected, chart will be rendered inside each selected HTML element. All existing elements inside the selected elements will be preserved. The method returns the original jQuery selection to allow chaining of other jQuery methods.
An object of chart configurations (set of key, value pairs) can be passed as parameter. Click here to view complete list of chart configurations. |
||||||||||||||||||||||||||||||||
cloneFusionCharts(callback: function, [cloneConfigurations: Object]) |
This method makes a copy of existing charts in the selection and passes the list of cloned chart objects to a function for further processing.
The method looks for all the charts in jQuery selected elements and clones them. An array of cloned chart objects (in this Array) is passed to a callback function whose name or reference needs to be passed as a mandatory parameter to cloneFusionCharts method. You can also use an anonymous function as the callback function.
Before cloning of existing charts, you can optionally overwrite some of the configurations of the existing charts. This can be achieved by passing an object (set of key or value pairs) containing chart configurations as cloneConfigurations parameter. Click here to view complete list of chart configurations. |
||||||||||||||||||||||||||||||||
updateFusionCharts(updateConfigurations: Object) |
This method helps in updating chart configurations of an existing chart at run-time. Barring id, you can re-configure type , dataSource , dataFormat , width , height etc. of existing charts. The possible updateConfigurations can be found here.
Please note that id cannot be passed to updateConfigurations parameter. This method is applied to HTML elements selected using jQuery selector. It finds all the charts rendered in the selected elements and updates all these charts with the values passed through updateConfigurations parameter.
Please note that the charts thus updated are internally re-drawn with the new configurations. |
||||||||||||||||||||||||||||||||
attrFusionCharts(chartAttribute: string) or
attrFusionCharts(chartAttribute:string, newValue:string) or
attrFusionCharts(chartAttributes: Object) |
Using this method you can dynamically retrieve or update chart's root properties (also known as "chart attributes" which are passed through chart object in constructor JSON data). This feature comes handy when one wishes to change the chart titles, theme colors, number formatting or scaling setup, divisional line and grid configurations and other functional and cosmetic features of existing charts.
The method is applied on all charts in the selected HTML elements. It finds all the charts rendered in the selected elements and retrieves the value of a chart parameter from those charts or updates those charts with new parameter values. This method returns the value of a chart attribute (of an existing chart) if the name of the chart attribute is passed to the method as a single string parameter. If a second parameter ( newValue ) is passed to the method along with the name of the chart attribute, the chart gets updated with the new parameter value. The attrFusionCharts method also accepts a set of key/value pairs (JavaScript Object) that applies the values to multiple chart attributes in existing charts. Please note that when the charts are updated with selective configurations and properties, internally, the charts are being re-drawn. |
||||||||||||||||||||||||||||||||
convertToFusionCharts(chartOptions: Object, [conversionConfigurations: Object]) |
This method is an added feature of the jQuery plug-in and can convert a table containing numeric data to a multi-series chart. In effect, the html table acts as the dataSource for the chart that is rendered. The return value is a jQuery object containing all the newly created instances of FusionCharts.
The first parameter passed to this method is the chart configuration object. It should be noted that the jQuery selector here corresponds to the table element and, therefore it is important to provide a valid renderAt in the chart configuration. If renderAt is not provided then the chart will be drawn next to the table. The dataFormat to be provided in the chart configuration is htmltable .
The optional second parameter passed to this method is the conversion options object.
|
||||||||||||||||||||||||||||||||
disposeFusionCharts() |
You can remove a chart instance from page and memory using disposeFusionCharts() function. Additionally, the function will raise beforeDispose event prior to removing a chart and disposed event after the chart has been removed. |
||||||||||||||||||||||||||||||||
Selector | |||||||||||||||||||||||||||||||||
:FusionCharts
|
A custom jQuery selector :FusionCharts which helps in selecting all the charts rendered using FusionCharts jQuery plugin or using FusionCharts JavaScript Class. You can use this custom selector as a conventional jQuery selector. |
||||||||||||||||||||||||||||||||
Event handling | |||||||||||||||||||||||||||||||||
bind(eventType: String, eventHandler: function) oron(eventType: String, eventHandler: function) |
Binds an event handler to the specified FusionChart event. The event handler needs to be attached to the the container HTML elements containing the FusionCharts objects. As the first parameter, the method takes the name of the event (through eventType parameter). The list of events exposed by FusionCharts can be found here. These events can be used with the FusionCharts jQuery plugin by prefixing them with the text "fusioncharts" and using the lowercase representation of the event name. For example, the beforeRender event will be named as fusionchartsbeforerender . This is done to avoid conflict with the existing jQuery events that might have the same names. The parameters passed to the event handler function, however, are the same. |