M/style/chart/Variable~Variable


import Variable from 'M/style/chart/Variable';

Main constructor of the class. Creates a chart variable

new Variable()

facade/js/chart/Variable.js, line 36
Name Type Description
options. Mx.ChartVariableOptions
  • attribute {string} the feature property name where data is stored

    • label {number}
      • text {string|Function} data label displayed. If this property is a
        function the args passed will be: currentVal, values, feature
      • stroke.
        • color {string} the color of the data label stroke
        • width {number} the width of the data label stroke
      • radiusIncrement {number} distance between text position origin and
                   chart radius
      • fill {string} the color of the data label
      • font {string} the font family of the data label
      • scale {number} the scale of the data label. We can't use a font size so
         canvas will rescales the text
    • fill {number} the color of the chart representation fill (if chart type = 'bar')
      this property sets the bar fill color
    • legend {string} the layerswitcher legend label

    [WARN] Notice that label property only will be applied if the geometry is not of type 'multipolygon' and chart type is distinct of 'bar' type