ref :DOMElement

Every instance of FusionCharts, when rendered within a container element (provided by the renderAt parameter,) creates a <span> element within which a chart is rendered. As such, the user-provided container element is not polluted by the DOM elements created by a chart.

Type:

DOMElement

Since:
  • 3.2.0
Deprecated:
  • 3.4.0 - This method has been deprecated as direct access to `DOMElement` of the chart has become redundant.
    Example
    // Iterate on all charts rendered on a page and move them to a common location
    var sidebar = document.getElementById('sidebar-html-div'), // assuming that your common container is this
        chart;
    
    for (chart in FusionCharts.items) {
        chart = FusionCharts.items[chart];
        chart.ref && sidebar.appendChild(chart.ref.parentNode);
    }

    <inner> dataFormats

    The list of data formats that can be passed over to FusionCharts#setChartData or FusionCharts#setChartDataUrl or during creating a new instance of FusionCharts. The parameters that accept data format should have one of the values from this enumeration.

    Properties:
    Property Description
    json
    Type:
    string

    This denotes that the data being passed on to the chart or returned by the chart is in standard JSON format. The JSON format can be a string containg JSON data or it can also be a JavaScript object.

    jsonurl
    Type:
    string

    Specifying the data format as jsonurl indicates that the data is not JSON data by itself but rather the data being passed is a URL pointing to a file that contains JSON data.

    csv
    Type:
    string

    FusionCharts supports data in comma separated value format. However, this is presently supported to retrieve data set in one of the other formats and data cannot be passed on to chart in CSV format.

    xml
    Type:
    string

    Specifies that the data passed on to the chart is in XML format. As such the data is expected to be a string containing XML data.

    xmlurl
    Type:
    string

    The xml data format is transportable by nature. This means that specifying the data as an URL to a file that contains XML is a valid option.

    <static> items :object

    The reference to every new instance of FusionCharts is maintained in this object with the chart ID as the key. Upon FusionCharts#dispose of the instance, the key is removed from this. One can iterate through all instances of FusionCharts using this object.

    A short-hand approach to accessing a single chart by its id is to use FusionCharts function itself but without the new operator and by passing the chart id as the first parameter.

    Type:

    object

    Examples
    // Assuming a page has many instances of FusionCharts, but
    // none of them are rendered, we are going to iterate through all and
    // render them.
    for (var item in FusionCharts.items) {
        FusionCharts.items[item].render();
    }
    // Alternate method to access the charts using FusionCharts function to retrieve the chart from its id.
    for (var item in FusionCharts.items) {
        FusionCharts(item).render();
    }

    <inner> DOMInsertModes :string

    When a chart is rendered within a DOM element on a page, the chart by default clears its contents and replaces them with the chart. However, this behavior can be changed by specifying the insertMode of the chart during construction of a chart or while calling FusionCharts#render.

    Type:

    string

    <static> version :array

    Specifies the framework version of FusionCharts. In the format [major, minor, revision, nature, build]

    Type:

    array

    annotations :FusionCharts~annotations

    Annotations are a set of customisable shapes (squares, circles, texts, images) that can be created and positioned anywhere on charts. Whenever a new FusionCharts object is created, one instance of the class FusionCharts~annotations is created. Whenever annotation definitions are added via data, this object is updated with the same.

    Type:

    FusionCharts~annotations

    <inner> chartStatusMessages :string

    Type:

    string