Data Visualization Widgets Chart

A widget providing charts of various types for web applications.

Included in: dx.viz.js, dx.viz-web.js, dx.all.js
Module: viz/chart
Chart interactive configuration
Copy code
$("#chart").dxChart({
});

Chart is a widget that visualizes different types of data using a great variety of series types. Additionally, it provides a wide range of interactive features, such as hovering, selection, zooming, etc., and flexible customization abilities.

You can create the Chart widget using one of the following approaches.

  • jQuery
    Use the dxChart jQuery plug-in.

    HTML
    <div id="chartContainer"></div>
    JavaScript
    $("#chartContainer").dxChart({
        dataSource: dataSource,
        commonSeriesSettings: {
            argumentField: "state",
            type: "bar"
        },
        series: [
            { valueField: "year2004", name: "2004" },
            { valueField: "year2001", name: "2001" },
            { valueField: "year1998", name: "1998" }
        ]
    });
  • Knockout
    Add a <div> element and apply the dxChart binding to this element.

    HTML
    <div data-bind="dxChart: {
        dataSource: dataSource,
        commonSeriesSettings: {
            argumentField: 'state',
            type: 'bar'
        },
        series: [
            { valueField: 'year2004', name: '2004' },
            { valueField: 'year2001', name: '2001' },
            { valueField: 'year1998', name: '1998' }
        ]
    }"></div>
  • AngularJS
    Add a <div> element and apply the dx-chart directive to this element.

    HTML
    <div dx-chart="{
        dataSource: dataSource,
        commonSeriesSettings: {
            argumentField: 'state',
            type: 'bar'
        },
        series: [
            { valueField: 'year2004', name: '2004' },
            { valueField: 'year2001', name: '2001' },
            { valueField: 'year1998', name: '1998' }
        ]
    }"></div>

All DevExtreme widgets require linking the jQuery library. Linking the Knockout or AngularJS library is optional. For detailed information on how to link the needed libraries, refer to the Installation article.

Start Tutorial View Demo

See Also
  • Data Binding - shows how to provide data for the Chart widget.
  • Chart Elements - provides an overview of visual elements present in the Chart widget.

Configuration

This section describes properties that configure the contents, behavior and appearance of the Chart widget.

Methods

This section describes the methods that can be used in code to manipulate the Chart widget.

Use the dxChart registered method to access the Chart widget as demonstrated in the code below.

JavaScript
var chart = $("#chartContainer").dxChart("instance");

Events

This section describes events fired by this widget.

Series Types

This section lists objects that define options used to configure series of specific types.

Chart Elements

This section lists the methods and fields of chart elements.