Kendo

  • UI Framework
  • Mobile
  • Demos
  • Roadmap
  • What's New
  • Download

Skin

  • Framework
  • UI Widgets
  • Integration

    Information

    Note: Security restrictions in Chrome prevent this example from working when the page is loaded from the file system (via file:// protocol).

    • Description
    • View Code
    • Configuration (12)
    • Methods (1)
    • Events (2)

    The Chart widget uses modern browser technologies to render high-quality data visualizations in the browser. Rather than generating images on a server, Chart graphics are rendered in the browser using SVG (scalable vector graphics), with a fallback to VML (vector markup language) for older browsers.

    Supported chart types:

    • Bar
    • Column
    • Line
    • Pie

    Please visit the Kendo UI Road Map for additional information about new Chart types and features.

    Getting Started

    1. Create a simple HTML div (optionally set a height and width with CSS)

    <div id="chart"></div>

    2. Initialize the Kendo UI Chart with configuration and data

       $(document).ready(function() {
           $("#chart").kendoChart({
               title: {
                   text: "My Chart Title"
               },
               series: [
                   {
                       name: "Series 1",
                       data: [200, 450, 300, 125]
                   }
               ],
               categoryAxis: {
                   categories: [2000, 2001, 2002, 2003]
               }
           });
       });

    The basic configuration requires series data (Y-axis values) and categories (X-axis values). A chart title can also optionally be defined. The default chart type is column (vertical bars).

    Binding to Data

    A chart can be bound to both local and remote data. Rather than directly specifying an Array of values in the Chart configuration, the Chart DataSource property is used to bind to an Array or to a remote data service with the Kendo DataSource component.

    Binding a line chart to local JavaScript object array

    var salesData = [{
        employee: "Joe Smith",
        sales: 2000
    }, {
        employee: "Jane Smith",
        sales: 2250
    }, {
        employee: "Will Roberts",
        sales: 1550
    }]
    $(document).ready(function() {
        $("#chart").kendoChart({
            title: {
                text: "Employee Sales"
            },
            dataSource:{
                data: salesData
            },
            series:[{
                type: "line",
                field: "sales",
                name: "Sales in Units"
            }],
            categoryAxis:{
                field: "employee"
            }
        });
    });

    Binding to remote JSON data with multiple series

    $(document).ready(function(){
        $("#chart").kendoChart({
            title: {
                text: "Division Sales"
            },
            dataSource:{
                transport:{
                    read:{
                        url: "company-sales.json",
                        dataType: "json"
                    }
                },
                sort: {
                    field: "year",
                    dir: "asc"
                }
            },
            series: [{
                field: "americaSales",
                name: "North America"
            }, {
                field: "asiaSales",
                name: "Asia"
            }, {
                field: "europeSales",
                name: "Europe"
            }],
            categoryAxis:{
                field: "year"
            },
            valueAxis: {
                majorUnit: 1000
            }
        });
    });

    Configuring the Chart

    The Kendo UI Chart is highly configurable. With simple configuration settings, you can format and display series labels, position the chart legend, format and display tooltips, and change the chart type.

    Refer to the Chart demos and configuration API for a complete reference.

    No code
    categoryAxis: Object
    The value axis configuration options.
    axisCrossingValue: Number(default: 0)
    Category index at which the first perpendicular axis crosses this axis.
    categories: Array
    Array of category names.
    field: String
    The data field containing the category name.
    labels: Object
    Configures the axis labels.
    border: Object
    The border of the labels.
    color: String(default: "black")
    The color of the border.
    width: Number(default: 0)
    The width of the border.
    font: String(default: "12px Arial,Helvetica,sans-serif")
    The font style of the labels.
    format: String
    The format of the labels.

    Example

    //sets format of the labels
    format: "{0:C}"
    margin: Number|Object(default: 0)
    The margin of the labels.

    Example

    // sets the top, right, bottom and left margin to 3px.
    margin: 3
    // sets the top and left margin to 1px
    // margin right and bottom are with 0px (by default)
    margin: { top: 1, left: 1 }
    padding: Number|Object(default: 0)
    The padding of the labels.

    Example

    // sets the top, right, bottom and left padding to 3px.
    padding: 3
    // sets the top and left padding to 1px
    // padding right and bottom are with 0px (by default)
    padding: { top: 1, left: 1 }
    rotation: Number(default: 0)
    The rotation angle of the labels.
    template: String/Function
    The label template. Template variables:
    • value - the value
    • dataItem - the original data item used to construct the point. Will be null if binding to array.

    Example

    // chart intialization
    $("#chart").kendoChart({
         title: {
             text: "My Chart Title"
         },
         series: [
             {
                 name: "Series 1",
                 data: [200, 450, 300, 125]
             }
         ],
         categoryAxis: {
             categories: [2000, 2001, 2002, 2003],
             labels: {
                 // label template
                 template: "Year: ${ value }"
             }
         }
    });
    visible: Boolean(default: true)
    The visibility of the labels.
    line: Object
    Configures the axis line.
    color: String(default: "black")
    The color of the lines.
    visible: Boolean(default: true)
    The visibility of the lines.
    width: Number(default: 1)
    The width of the lines.
    majorGridLines: Object
    Configures the major grid lines.
    color: String(default: "black")
    The color of the lines.
    visible: Boolean(default: false)
    The visibility of the lines.
    width: Number(default: 1)
    The width of the lines.
    majorTickSize: Number(default: 3)
    The axis major tick size.
    majorTickType: String(default: "outside")
    The axis major tick size.
    "outside"
    The tick is drawn on the outer side of the axis.
    "none"
    No tick is drawn.
    minorGridLines: Object
    Configures the minor grid lines.
    color: String(default: "black")
    The color of the lines.
    visible: Boolean(default: false)
    The visibility of the lines.
    width: Number(default: 1)
    The width of the lines.
    minorTickSize: Number(default: 3)
    The axis minor tick size.
    minorTickType: String(default: "none")
    The axis minor tick size.
    "outside"
    The tick is drawn on the outer side of the axis.
    "none"
    No tick is drawn.
    chartArea: Object
    The chart area configuration options. This is the entire visible area of the chart.
    background: String(default: "white")
    The background color of the chart area.
    border: Object
    The border of the chart area.
    color: String(default: "black")
    The color of the border.
    width: Number(default: 0)
    The width of the border.
    margin: Number|Object(default: 5)
    The margin of the chart area.

    Example

    // sets the top, right, bottom and left margin to 3px.
    margin: 3
    // sets the top and left margin to 1px
    // margin right and bottom are with 5px (by default)
    margin: { top: 1, left: 1 }
    dataSource: Object
    DataSource configuration or instance.

    Example

    $("#chart").kendoChart({
        dataSource: {
            transport: {
                 read: "spain-electricity.json"
            }
        },
        series: [{
            field: "value"
        }],
        categoryAxis: {
            field: "year"
        }
    });
    // Alternative configuraiton
    var dataSource = new kendo.data.DataSource({
        transport: {
             read: "spain-electricity.json"
        }
    });
    $("#chart").kendoChart({
        dataSource: dataSource,
        series: [{
            field: "value"
        }],
        categoryAxis: {
            field: "year"
        }
    });
    legend: Object
    The chart legend configuration options.
    border: Object
    The border of the legend.
    color: String(default: "black")
    The color of the border.
    width: Number(default: 0)
    The width of the border.
    font: String(default: 12px Arial,Helvetica,sans-serif)
    The font style of the legend.
    margin: Number|Object(default: 10)
    The margin of the legend.

    Example

    // sets the top, right, bottom and left margin to 3px.
    margin: 3
    // sets the top and left margin to 1px
    // margin right and bottom are with 10px (by default)
    margin: { top: 1, left: 1 }
    offsetX: Number(default: 0)
    The X offset from its position.
    offsetY: Number(default: 0)
    The Y offset from its position.
    padding: Number|Object(default: 5)
    The padding of the legend.

    Example

    // sets the top, right, bottom and left padding to 3px.
    padding: 3
    // sets the top and left padding to 1px
    // padding right and bottom are with 5px (by default)
    padding: { top: 1, left: 1 }
    position: String(default: right)
    The positions of the legend.
    "top"
    The legend is positioned on the top.
    "bottom"
    The legend is positioned on the bottom.
    "left"
    The legend is positioned on the left.
    "right"
    The legend is positioned on the right.
    "custom"
    The legend is positioned using OffsetX and OffsetY.
    visible: Boolean(default: true)
    The visibility of the legend.
    plotArea: Object
    The plot area configuration options. This is the area containing the plotted series.
    background: String(default: "white")
    The background color of the plot area.
    border: Object
    The border of the plot area.
    color: String(default: "black")
    The color of the border.
    width: Number(default: 0)
    The width of the border.
    margin: Number|Object(default: 5)
    The margin of the plot area.

    Example

    // sets the top, right, bottom and left margin to 3px.
    margin: 3
    // sets the top and left margin to 1px
    // margin right and bottom are with 5px (by default)
    margin: { top: 1, left: 1 }
    series: Array
    Array of series definitions.

    The series type is determined by the value of the type field. If a type value is missing, the type is assumed to be the one specified in seriesDefaults.

    Each series type has a different set of options.

    field: String
    The data field containing the series value.
    name: String
    The series name visible in the legend.
    type="bar"
    The type of the series.
    border: Object
    The border of the series.
    color: String(default: the color of the curren series)
    The color of the border.
    width: Number(default: 1)
    The width of the border.
    color: String
    The series base color.
    gap: Number(default: 1.5)
    The distance between category clusters.
    labels: Object
    Configures the series data labels.
    border: Object
    The border of the labels.
    color: String(default: "black")
    The color of the border.
    width: Number(default: 0)
    The width of the border.
    font: String(default: "12px Arial,Helvetica,sans-serif")
    The font style of the labels.
    format: String
    The format of the labels.

    Example

    //sets format of the labels
    format: "{0:C}"
    margin: Number|Object(default: 2)
    The margin of the labels.

    Example

    // sets the top, right, bottom and left margin to 3px.
    margin: 3
    // sets the top and left margin to 1px
    // margin right and bottom are with 2px (by default)
    margin: { top: 1, left: 1 }
    padding: Number|Object(default: 2)
    The padding of the labels.

    Example

    // sets the top, right, bottom and left padding to 3px.
    padding: 3
    // sets the top and left padding to 1px
    // padding right and bottom are with 2px (by default)
    padding: { top: 1, left: 1 }
    position: String(default: "outsideEnd")
    Defines the position of the bar labels.
    "center"
    The label is positioned at the bar center.
    "insideEnd"
    The label is positioned inside, near the end of the bar.
    "insideBase"
    The label is positioned inside, near the base of the bar.
    "outsideEnd"
    The label is positioned outside, near the end of the bar. Not applicable for stacked bar series.
    template: String/Function
    The label template. Template variables:
    • value - the point value
    • category - the category name
    • series - the data series
    • dataItem - the original data item used to construct the point. Will be null if binding to array.

    Example

    // chart intialization
    $("#chart").kendoChart({
         title: {
             text: "My Chart Title"
         },
         series: [
             {
                 type: "bar",
                 name: "Series 1",
                 data: [200, 450, 300, 125],
                 labels: {
                     // label template
                     template: "${ value }%",
                     visible: true
                 }
             }
         ],
         categoryAxis: {
             categories: [2000, 2001, 2002, 2003]
         }
    });
    visible: Boolean(default: false)
    The visibility of the labels.
    name: String
    The series name.
    opacity: Number(default: 1)
    The series opacity.
    overlay: String(default: "glass")
    The effects overlay.
    spacing: Number(default: 0.4)
    Space between bars.
    stacked: Boolean(default: false)
    A value indicating if the series should be stacked.
    type="column"
    The type of the series.
    border: Object
    The border of the series.
    color: String(default: the color of the current series)
    The color of the border.
    width: Number(default: 1)
    The width of the border.
    color: String
    The series base color.
    gap: Number(default: 1.5)
    The distance between category clusters.
    labels: Object
    Configures the series data labels.
    border: Object
    The border of the labels.
    color: String(default: "black")
    The color of the border.
    width: Number(default: 0)
    The width of the border.
    font: String(default: "12px Arial,Helvetica,sans-serif")
    The font style of the labels.
    format: String
    The format of the labels.

    Example

    //sets format of the labels
    format: "{0:C}"
    margin: Number|Object(default: 2)
    The margin of the labels.

    Example

    // sets the top, right, bottom and left margin to 3px.
    margin: 3
    // sets the top and left margin to 1px
    // margin right and bottom are with 2px (by default)
    margin: { top: 1, left: 1 }
    padding: Number|Object(default: 2)
    The padding of the labels.

    Example

    // sets the top, right, bottom and left padding to 3px.
    padding: 3
    // sets the top and left padding to 1px
    // padding right and bottom are with 2px (by default)
    padding: { top: 1, left: 1 }
    position: String(default: "outsideEnd")
    Defines the position of the column labels.
    "center"
    The label is positioned at the bar center.
    "insideEnd"
    The label is positioned inside, near the end of the bar.
    "insideBase"
    The label is positioned inside, near the base of the bar.
    "outsideEnd"
    The label is positioned outside, near the end of the bar. Not applicable for stacked bar series.
    template: String/Function
    The label template. Template variables:
    • value - the point value
    • category - the category name
    • series - the data series
    • dataItem - the original data item used to construct the point. Will be null if binding to array.

    Example

    // chart intialization
    $("#chart").kendoChart({
         title: {
             text: "My Chart Title"
         },
         series: [
             {
                 type: "bar",
                 name: "Series 1",
                 data: [200, 450, 300, 125],
                 labels: {
                     // label template
                     template: "${ value }%",
                     visible: true
                 }
             }
         ],
         categoryAxis: {
             categories: [2000, 2001, 2002, 2003]
         }
    });
    visible: Boolean(default: false)
    The visibility of the labels.
    name: String
    The series name.
    opacity: Number(default: 1)
    The series opacity.
    overlay: String(default: "glass")
    The effects overlay.
    spacing: Number(default: 0.4)
    Space between bars.
    stacked: Boolean(default: false)
    A value indicating if the series should be stacked.
    type="line"
    The type of the series.
    color: String
    The series base color.
    labels: Object
    Configures the series data labels.
    border: Object
    The border of the labels.
    color: String(default: "black")
    The color of the border.
    width: Number(default: 0)
    The width of the border.
    font: String(default: "12px Arial,Helvetica,sans-serif")
    The font style of the labels.
    format: String
    The format of the labels.

    Example

    //sets format of the labels
    format: "{0:C}"
    margin: Number|Object(default: { left: 5, right: 5})
    The margin of the labels.

    Example

    // sets the top, right, bottom and left margin to 3px.
    margin: 3
    // sets the top and bottom margin to 1px
    // margin left and right are with 5px (by default)
    margin: { top: 1, bottom: 1 }
    missingValues: String(default: "gap")
    Configures the behavior for handling missing values in line series.
    "interpolate"
    The value is interpolated from neighboring points.
    "zero"
    The value is assumed to be zero.
    "gap"
    The line stops before the missing point and continues after it.
    padding: Number|Object(default: 0)
    The padding of the labels.

    Example

    // sets the top, right, bottom and left padding to 3px.
    padding: 3
    // sets the top and left padding to 1px
    // padding right and bottom are with 0px (by default)
    padding: { top: 1, left: 1 }
    position: String(default: "above")
    Defines the position of the bar labels.
    "above"
    The label is positioned at the top of the line chart marker.
    "right"
    The label is positioned at the right of the line chart marker.
    "below"
    The label is positioned at the bottom of the line chart marker.
    "left"
    The label is positioned at the left of the line chart marker.
    template: String/Function
    The label template. Template variables:
    • value - the value
    • dataItem - the original data item used to construct the point. Will be null if binding to array.

    Example

    // chart intialization
    $("#chart").kendoChart({
         title: {
             text: "My Chart Title"
         },
         series: [
             {
                 type: "column",
                 name: "Series 1",
                 data: [200, 450, 300, 125],
                 labels: {
                     // label template
                     template: "${ value }%",
                     visible: true
                 }
             }
         ],
         categoryAxis: {
             categories: [2000, 2001, 2002, 2003]
         }
    });
    visible: Boolean(default: false)
    The visibility of the labels.
    markers: Object
    Configures the line markers.
    background: String
    The background color of the current series markers.
    border: Object
    The border of the markers.
    color: String(default: "black")
    The color of the border.
    width: Number(default: 0)
    The width of the border.
    size: Number(default: 6)
    The marker size.
    type: String(default: "square")
    Configures the markers shape type.
    "square"
    The marker shape is square.
    "triagle"
    The marker shape is triagle.
    "circle"
    The marker shape is circle.
    visible: Boolean(default: true)
    The markers visibility.
    name: String
    The series name.
    opacity: Number(default: 1)
    The series opacity.
    stacked: Boolean(default: false)
    A value indicating if the series should be stacked.
    type="pie"
    The type of the series.
    border: Object
    The border of the series.
    color: String(default: the color of the curren series)
    The color of the border.
    width: Number(default: 1)
    The width of the border.
    connector: Object
    The labels connector options.
    color: String(default: "#939393")
    The color of the connector line.
    padding: Number(default: 4)
    The padding between the connector line and the label.
    width: Number(default: 1)
    The width of the connector line.
    data: Array
    Array of data items (optional). The pie chart can be bound to an array of numbers or an array of objects with the following fields:
    value
    The sector value.
    category
    The sector category that is shown in the legend.
    color
    The sector color.
    explode
    A boolean value indicating whether to explode the sector.

    Example

    // ...
     series:[{
         type: "pie",
         data:[{
             value: 40,
             category: "Apples"
         }, {
             value: 60,
             category: "Oranges",
             color: "#ff6103"
             }
         ],
         name: "Sales in Percent"
     }]
     // ...
    labels: Object
    Configures the series data labels.
    align: String(default: "circle")
    Defines the alignment of the pie labels.
    "circle"
    The labels are positioned in circle around the pie chart.
    "column"
    The labels are positioned in columns to the left and right of the pie chart.
    border: Object
    The border of the labels.
    color: String(default: "black")
    The color of the border.
    width: Number(default: 0)
    The width of the border.
    font: String(default: "12px Arial, sans-serif")
    The font style of the labels.
    format: String
    The format of the labels.

    Example

    //sets format of the labels
    format: "{0:C}"
    margin: Number|Object(default: 0.5)
    The margin of the labels.

    Example

    // sets the top, right, bottom and left margin to 3px.
    margin: 3
    // sets the top and left margin to 1px
    // margin right and bottom are with 2px (by default)
    margin: { top: 1, left: 1 }
    padding: Number|Object(default: 0)
    The padding of the labels.

    Example

    // sets the top, right, bottom and left padding to 3px.
    padding: 3
    // sets the top and left padding to 1px
    // padding right and bottom are with 2px (by default)
    padding: { top: 1, left: 1 }
    template: String/Function
    The label template. Template variables:
    value
    the point value
    category
    the category name
    series
    the data series
    dataItem
    the original data item used to construct the point (when binding from dataSource)

    Example

    // chart intialization
    $("#chart").kendoChart({
         title: {
             text: "My Chart Title"
         },
         series: [
             {
                 type: "pie",
                 name: "Series 1",
                 data: [
                     { value: 200, category: 2000 },
                     { value: 450, category: 2001 },
                     { value: 300, category: 2002 },
                     { value: 125, category: 2003 }
                 ],
                 labels: {
                     // label template
                     template: "${ value }%",
                     visible: true
                 }
             }
         ],
         categoryAxis: {
             categories: [2000, 2001, 2002, 2003]
         }
    });
    visible: Boolean(default: false)
    The visibility of the labels.
    opacity: Number(default: 1)
    The series opacity.
    overlay: String(default: "glass")
    The effects overlay.
    padding: Number(default: 60)
    The padding around the pie chart (equal on all sides).
    startAngle: number(default: 90)
    The start angle of the first pie segment.
    seriesDefaults: Object
    Default values for each series.
    bar: Object
    The default options for all bar series. For more details see the series options.
    border: Object
    The border of the series.
    color: String(default: "black")
    The color of the border.
    width: Number(default: 0)
    The width of the border.
    column: Object
    The column configuration options. The default options for all column series. For more details see the series options.
    gap: Number(default: 1.5)
    The distance between category clusters.
    labels: Object
    Configures the series data labels.
    border: Object
    The border of the labels.
    color: String(default: "black")
    The color of the border.
    width: Number(default: 0)
    The width of the border.
    font: String(default: "12px Arial,Helvetica,sans-serif")
    The font style of the labels.
    format: String
    The format of the labels.

    Example

    //sets format of the labels
    format: "{0:C}"
    margin: Number|Object(default: 0)
    The margin of the labels.

    Example

    // sets the top, right, bottom and left margin to 3px.
    margin: 3
    // sets the top and left margin to 1px
    // margin right and bottom are with 0px (by default)
    margin: { top: 1, left: 1 }
    padding: Number|Object(default: 0)
    The padding of the labels.

    Example

    // sets the top, right, bottom and left padding to 3px.
    padding: 3
    // sets the top and left padding to 1px
    // padding right and bottom are with 0px (by default)
    padding: { top: 1, left: 1 }
    template: String/Function
    The label template. Template variables:
    • value - the point value
    • category - the category name
    • series - the data series
    • dataItem - the original data item used to construct the point. Will be null if binding to array.

    Example

    // chart intialization
    $("#chart").kendoChart({
         title: {
             text: "My Chart Title"
         },
         seriesDefault: {
             labels: {
                 // label template
                 template: "${ value }%",
                 visible: true
             }
         },
         series: [
             {
                 name: "Series 1",
                 data: [200, 450, 300, 125]
             }
         ],
         categoryAxis: {
             categories: [2000, 2001, 2002, 2003]
         }
    });
    visible: Boolean(default: false)
    The visibility of the labels.
    line: Object
    The line configuration options. The default options for all line series. For more details see the series options.
    overlay: Object
    The effects overlay.
    gradient: String(default: "glass")
    Gradient name.
    "glass"
    The bars have glass effect overlay.
    "none"
    The bars have no effect overlay.
    pie: Object
    The pie configuration options. The default options for all pie series. For more details see the series options.
    spacing: Number(default: 0.4)
    Space between bars.
    stacked: Boolean(default: false)
    A value indicating if the series should be stacked.
    theme: String
    Sets Chart theme. Available themes: kendo, blueOpal, black.
    title: Object
    The chart title configuration options.
    align: String(default: "center")
    The alignment of the title.
    "left"
    The text is aligned to the left.
    "center"
    The text is aligned to the middle.
    "right"
    The text is aligned to the right.
    border: Object
    The border of the title.
    color: String(default: "black")
    The color of the border.
    width: Number(default: 0)
    The width of the border.
    font: String(default: "16px Arial,Helvetica,sans-serif")
    The font style of the title.
    margin: Number|Object(default: 5)
    The margin of the title.

    Example

    // sets the top, right, bottom and left margin to 3px.
    margin: 3
    // sets the top and left margin to 1px
    // margin right and bottom are with 5px (by default)
    margin: { top: 1, left: 1 }
    padding: Number|Object(default: 5)
    The padding of the title.

    Example

    // sets the top, right, bottom and left padding to 3px.
    padding: 3
    // sets the top and left padding to 1px
    // padding right and bottom are with 5px (by default)
    padding: { top: 1, left: 1 }
    position: String(default: "top")
    The positions of the title.
    "top"
    The title is positioned on the top.
    "bottom"
    The title is positioned on the bottom.
    text: String
    The title of the chart.
    visible: Boolean(default: false)
    The visibility of the title.
    tooltip: Object
    The data point tooltip configuration options.
    background: String
    The background color of the tooltip. The default is determined from the series color.
    border: Object
    The border configuration options.
    color: String(default: "black")
    The color of the border.
    width: Number(default: 0)
    The width of the border.
    color: String
    The text color of the tooltip. The default is the same as the series labels color.
    font: String(default: "12px Arial,Helvetica,sans-serif")
    The tooltip font.
    format: String
    The tooltip format.

    Example

    //sets format of the tooltip
    format: "{0:C}"
    padding: Number|Object
    The padding of the tooltip.

    Example

    // sets the top, right, bottom and left padding to 3px.
    padding: 3
    // sets the top and left padding to 1px
    // right and bottom padding are left at their default values
    padding: { top: 1, left: 1 }
    template: String|Function
    The tooltip template. Template variables:
    • value - the point value
    • category - the category name
    • series - the data series
    • dataItem - the original data item (when binding to dataSource)

    Example

    $("#chart").kendoChart({
         title: {
             text: "My Chart Title"
         },
         series: [
             {
                 name: "Series 1",
                 data: [200, 450, 300, 125]
             }
         ],
         categoryAxis: {
             categories: [2000, 2001, 2002, 2003]
         },
         tooltip: {
             visible: true,
             template: "${category} - ${value}"
         }
    });
    transitions: Boolean(default: true)
    A value indicating if transition animations should be played.
    valueAxis: Object
    The value axis configuration options.
    axisCrossingValue: Number(default: 0)
    Value at which the first perpendicular axis crosses this axis.
    labels: Object
    Configures the axis labels.
    border: Object
    The border of the labels.
    color: String(default: "black")
    The color of the border.
    width: Number(default: 0)
    The width of the border.
    font: String(default: "12px Arial,Helvetica,sans-serif")
    The font style of the labels.
    format: String
    The format of the labels.

    Example

    //sets format of the labels
    format: "{0:C}"
    margin: Number|Object(default: 0)
    The margin of the labels.

    Example

    // sets the top, right, bottom and left margin to 3px.
    margin: 3
    // sets the top and left margin to 1px
    // margin right and bottom are with 0px (by default)
    margin: { top: 1, left: 1 }
    padding: Number|Object(default: 0)
    The padding of the labels.

    Example

    // sets the top, right, bottom and left padding to 3px.
    padding: 3
    // sets the top and left padding to 1px
    // padding right and bottom are with 0px (by default)
    padding: { top: 1, left: 1 }
    rotation: Number(default: 0)
    The rotation angle of the labels.
    template: String/Function
    The label template. Template variables:
    • value - the value

    Example

    // chart intialization
    $("#chart").kendoChart({
         title: {
             text: "My Chart Title"
         },
         series: [
             {
                 name: "Series 1",
                 data: [200, 450, 300, 125]
             }
         ],
         categoryAxis: {
             categories: [2000, 2001, 2002, 2003]
         },
         valueAxis: {
             labels: {
                 // label template
                 template: "${ value }%"
             }
         }
    });
    visible: Boolean(default: true)
    The visibility of the labels.
    line: Object
    Configures the axis line.
    color: String(default: "black")
    The color of the lines.
    visible: Boolean(default: true)
    The visibility of the lines.
    width: Number(default: 1)
    The width of the lines.
    majorGridLines: Object
    Configures the major grid lines.
    color: String(default: "black")
    The color of the lines.
    visible: Boolean(default: true)
    The visibility of the lines.
    width: Number(default: 1)
    The width of the lines.
    majorTickSize: Number(default: 4)
    The axis major tick size.
    majorTickType: String(default: outside)
    The major tick type.
    "outside"
    The tick is drawn on the outer side of the axis.
    "none"
    No tick is drawn.
    majorUnits: Number
    The interval between major divisions.
    max: Number(default: 1)
    The maximum value of the axis.
    min: Number(default: 0)
    The minimum value of the axis.
    minorGridLines: Object
    Configures the minor grid lines.
    color: String(default: "black")
    The color of the lines.
    visible: Boolean(default: false)
    The visibility of the lines.
    width: Number(default: 1)
    The width of the lines.
    minorTickSize: Number(default: 3)
    The axis minor tick size.
    minorTickType: String(default: none)
    The minor tick type.
    "outside"
    The tick is drawn on the outer side of the axis.
    "none"
    No tick is drawn.
    • refresh ()
      Reloads the data and repaints the chart.

      Example

      var chart = $("#chart").data("kendoChart");
      // refreshes the chart
      chart.refresh();
    dataBound
    Fires when the chart has received data from the data source and is about to render it.
    seriesClick
    Fires when chart series are clicked.

    Event data

    value : Object
    The data point value.
    category : Object
    The data point category
    series : Object
    The clicked series.
    dataItem : Object
    The original data item (when binding to dataSource).
    element : Object
    The DOM element of the data point.
    • Home
    • UI Framework
    • Mobile
    • Demos
    • Roadmap
    • What's New
    • Blogs
    • Forums
    • Documentation
    • FAQ
    • About
    • Follow us on Twitter
    • Subscribe to our RSS feed

    Kendo UI is powered by Telerik

    Copyright © 2011 Telerik Inc. All rights reserved.