series

defines configuration of chart series

array series;

Example

var chart = new dhx.Chart("chart_container",{
    type:"bar",
    scales: {
        "bottom" : {
            text: "month"
        },
        "left" : {}
    },
    series: [
        {
            id: "A",
            value: "company A",
            fill: "#394E79",
            stacked: stacked,
            color: "none"
        },
        {
            id: "B",
            value:"company B",
            fill: "#5E83BA",
            stacked: stacked,
            color: "none"
        }
    ]
});

Details

The list of config options for series (for charts with scales)

  • id - (string) the id of a series
  • type - (string) the type of a chart
  • active - (boolean) defines, whether a series is active/inactive
  • pointColor - (string) the color of data item points in a series
  • dashed - (boolean) sets the dashed type for a series line
  • strokeWidth - (number) the width of the chart outline
  • value - (string) the name of a data set property to map data values to
  • pointType - (string) sets the type of the point of the data item. There are the following point types:"circle","rect","triangle","rhombus","simpleRect","simpleCircle","empty"
    Related sample:  Chart. Point Types
  • css - (string) adds a style class for a series
  • color - (string) the color of the series outline
  • tooltip - (boolean) shows values of data items in tooltips, true by default
  • tooltipTemplate - (function) a function that defines a template for showing values of data items in tooltip
    Related sample:  Chart. Tooltip Template

Options specific for Area, Bar and Radar charts

  • fill - (string) the color of the series filling in Hex format
  • alpha - (number) transparency of the series filling

Options specific for Bar charts

The list of config options for series (for charts without scales: Pie, Pie3D, Donut)

  • id - (string) the id of a series
  • text - (string) the name of the data set property to map labels of data values to
  • value - (string) the name of the data set property to map data values to
  • color - (string) points to the property in a data set that defines the color of a pie/donut sector
  • useLines - (boolean) shows/hides lines used to "connect" chart sectors with labels
  • subType - (string) specifies the subtype of a chart: "basic"|"percentOnly"|"valueOnly" (used for Donut chart only)
  • stroke - (string) the color of lines between sectors of a chart
  • monochrome - (string) colors chart sections in the shades of a color specified as a value of this property (e.g. "blue")
  • paddings - (number) paddings between a chart and its initial position
  • showText - (boolean) shows/hides values of data items on the chart (Pie, Pie3D)
  • showTextTemplate - (function) a function that specifies the template for showing values of data items on the chart (Pie, Pie3D)
See also
Back to top