Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
defaultValue: defaults.enableArea,
controlType: 'switch',
group: 'Style',
},
{
key: 'areaBaselineValue',
help: 'Define the value to be used for area baseline.',
description: `
Define the value to be used for area baseline.
Please note that this value isn't the
position of the baseline but the value used
to compute it.
`,
type: 'number | string | Date',
required: false,
defaultValue: defaults.areaBaselineValue,
controlType: 'range',
group: 'Style',
controlOptions: {
min: 0,
max: 200,
step: 10,
},
},
{
key: 'areaOpacity',
help: 'Area opacity (0~1), depends on enableArea.',
required: false,
defaultValue: defaults.areaOpacity,
type: 'number',
controlType: 'opacity',
group: 'Style',
type: 'number',
controlType: 'opacity',
group: 'Style',
},
{
key: 'areaBlendMode',
flavors: ['svg'],
help: 'Defines CSS mix-blend-mode property.',
description: `
Defines CSS \`mix-blend-mode\` property for areas,
see
[MDN documentation](https://developer.mozilla.org/fr/docs/Web/CSS/mix-blend-mode).
`,
type: 'string',
required: false,
defaultValue: defaults.areaBlendMode,
controlType: 'blendMode',
group: 'Style',
},
{
key: 'layers',
group: 'Customization',
help: 'Defines the order of layers and add custom layers.',
description: `
You can also use this property to insert extra layers
to the chart, this extra layer must be
a function which will receive the chart
computed data and must return a valid SVG element.
`,
required: false,
defaultValue: defaults.layers,
},
type: 'number | string | Date',
required: false,
defaultValue: defaults.areaBaselineValue,
controlType: 'range',
group: 'Style',
controlOptions: {
min: 0,
max: 200,
step: 10,
},
},
{
key: 'areaOpacity',
help: 'Area opacity (0~1), depends on enableArea.',
required: false,
defaultValue: defaults.areaOpacity,
type: 'number',
controlType: 'opacity',
group: 'Style',
},
{
key: 'areaBlendMode',
flavors: ['svg'],
help: 'Defines CSS mix-blend-mode property.',
description: `
Defines CSS \`mix-blend-mode\` property for areas,
see
[MDN documentation](https://developer.mozilla.org/fr/docs/Web/CSS/mix-blend-mode).
`,
type: 'string',
required: false,
defaultValue: defaults.areaBlendMode,
defaultValue: defaults.curve,
controlType: 'choices',
group: 'Style',
controlOptions: {
choices: lineCurvePropKeys.map(key => ({
label: key,
value: key,
})),
},
},
{
key: 'colors',
help: 'Defines color range.',
type: 'string | Function | string[]',
required: false,
defaultValue: defaults.colors,
controlType: 'ordinalColors',
group: 'Style',
},
{
key: 'lineWidth',
help: 'Line width.',
type: 'number',
required: false,
defaultValue: defaults.lineWidth,
controlType: 'lineWidth',
group: 'Style',
},
{
key: 'enableArea',
help: 'Enable/disable area below each line.',
type: 'boolean',
{
key: 'enableCrosshair',
flavors: ['svg'],
group: 'Interactivity',
help: 'Enable/disable crosshair.',
type: 'boolean',
required: false,
controlType: 'switch',
defaultValue: defaults.enableCrosshair,
},
{
key: 'crosshairType',
flavors: ['svg'],
group: 'Interactivity',
required: false,
defaultValue: defaults.crosshairType,
help: `Crosshair type, forced to slices axis if enabled.`,
type: 'string',
controlType: 'choices',
controlOptions: {
disabled: true,
choices: [
'x',
'y',
'top-left',
'top',
'top-right',
'right',
'bottom-right',
'bottom',
'bottom-left',
'left',
key: 'margin',
help: 'Chart margin.',
type: 'object',
required: false,
controlType: 'margin',
group: 'Base',
},
{
key: 'curve',
help: 'Curve interpolation.',
description: `
Defines the curve factory to use for the line generator.
`,
type: 'string',
required: false,
defaultValue: defaults.curve,
controlType: 'choices',
group: 'Style',
controlOptions: {
choices: lineCurvePropKeys.map(key => ({
label: key,
value: key,
})),
},
},
{
key: 'colors',
help: 'Defines color range.',
type: 'string | Function | string[]',
required: false,
defaultValue: defaults.colors,
controlType: 'ordinalColors',
key: 'useMesh',
flavors: ['svg'],
help: 'Use a voronoi mesh to detect mouse interactions, enableSlices must be disabled',
type: 'boolean',
required: false,
defaultValue: defaults.useMesh,
controlType: 'switch',
group: 'Interactivity',
},
{
key: 'debugMesh',
flavors: ['svg', 'canvas'],
help: 'Display mesh used to detect mouse interactions (voronoi cells).',
type: 'boolean',
required: false,
defaultValue: defaults.debugMesh,
controlType: 'switch',
group: 'Interactivity',
},
{
key: 'onMouseEnter',
flavors: ['svg'],
group: 'Interactivity',
help: `onMouseEnter handler, doesn't work with slice tooltip.`,
type: '(point, event) => void',
required: false,
},
{
key: 'onMouseMove',
flavors: ['svg'],
group: 'Interactivity',
help: `onMouseMove handler, doesn't work with slice tooltip.`,
value: 'x',
},
{
label: 'y',
value: 'y',
},
],
},
},
{
key: 'debugSlices',
flavors: ['svg'],
help: 'Display area used to detect mouse interactions for slices.',
type: 'boolean',
required: false,
defaultValue: defaults.debugSlices,
controlType: 'switch',
group: 'Interactivity',
},
{
key: 'sliceTooltip',
flavors: ['svg', 'canvas'],
group: 'Interactivity',
help: `Custom slice tooltip`,
type: 'Function',
required: false,
},
{
key: 'enableCrosshair',
flavors: ['svg'],
group: 'Interactivity',
help: 'Enable/disable crosshair.',
},
{
key: 'lineWidth',
help: 'Line width.',
type: 'number',
required: false,
defaultValue: defaults.lineWidth,
controlType: 'lineWidth',
group: 'Style',
},
{
key: 'enableArea',
help: 'Enable/disable area below each line.',
type: 'boolean',
required: false,
defaultValue: defaults.enableArea,
controlType: 'switch',
group: 'Style',
},
{
key: 'areaBaselineValue',
help: 'Define the value to be used for area baseline.',
description: `
Define the value to be used for area baseline.
Please note that this value isn't the
position of the baseline but the value used
to compute it.
`,
type: 'number | string | Date',
required: false,
defaultValue: defaults.areaBaselineValue,
controlType: 'range',
key: 'sliceTooltip',
flavors: ['svg', 'canvas'],
group: 'Interactivity',
help: `Custom slice tooltip`,
type: 'Function',
required: false,
},
{
key: 'enableCrosshair',
flavors: ['svg'],
group: 'Interactivity',
help: 'Enable/disable crosshair.',
type: 'boolean',
required: false,
controlType: 'switch',
defaultValue: defaults.enableCrosshair,
},
{
key: 'crosshairType',
flavors: ['svg'],
group: 'Interactivity',
required: false,
defaultValue: defaults.crosshairType,
help: `Crosshair type, forced to slices axis if enabled.`,
type: 'string',
controlType: 'choices',
controlOptions: {
disabled: true,
choices: [
'x',
'y',
'top-left',