DataSeries

new DataSeries

Creates data series.
Parameters:
Name Type Description
params Object Parameters to initialize series with.
Properties
Name Type Description
values Array The data set to visualize.
attribute String Numberic or color attribute to use for data visualization. This could be: fill, stroke, fill-opacity, stroke-opacity for markers and regions and r (radius) for markers only.
scale Array Values used to map a dimension of data to a visual representation. The first value sets visualization for minimum value from the data set and the last value sets visualization for the maximum value. There also could be intermidiate values. Default value is ['#C8EEFF', '#0071A4']
normalizeFunction Function | String The function used to map input values to the provided scale. This parameter could be provided as function or one of the strings: 'linear' or 'polynomial', while 'linear' is used by default. The function provided takes value from the data set as an input and returns corresponding value from the scale.
min Number Minimum value of the data set. Could be calculated automatically if not provided.
min Number Maximum value of the data set. Could be calculated automatically if not provided.

Methods

setNormalizeFunction

Set normalize function of the data series.
Parameters:
Name Type Description
normilizeFunction. Function | String

setScale

Set scale of the data series.
Parameters:
Name Type Description
scale Array Values representing scale.

setValues

Set values for the data set.
Parameters:
Name Type Description
values Object Object which maps codes of regions or markers to values.