Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
type: 'number',
required: false,
defaultValue: defaults.borderWidth,
controlType: 'lineWidth',
group: 'Style',
},
{
key: 'borderColor',
help: 'Method to compute border color.',
description: `
how to compute border color,
[see dedicated documentation](self:/guides/colors).
`,
type: 'string | object | Function',
required: false,
defaultValue: defaults.borderColor,
controlType: 'inheritedColor',
group: 'Style',
},
...defsProperties('Style', ['svg']),
{
key: 'enableLabel',
help: 'Enable/disable labels.',
type: 'boolean',
required: false,
defaultValue: defaults.enableLabel,
controlType: 'switch',
group: 'Labels',
},
{
key: 'label',
help: 'Label accessor.',
max: 10,
},
},
{
key: 'borderColor',
scopes: '*',
description: (
<span>
how to compute border color,{' '}
see dedicated documentation.
</span>
),
help: 'Method to compute border color.',
type: '{string|Function}',
required: false,
default: defaults.borderColor,
controlType: 'color',
controlGroup: 'Style',
controlOptions: {
withCustomColor: true,
},
},
...defsProperties(['Bubble']),
...marginProperties,
{
key: 'enableLabel',
scopes: '*',
description: 'Enable/disable labels.',
type: '{boolean}',
required: false,
default: defaults.enableLabel,
controlType: 'switch',
label: 'depth',
value: 'depth',
},
{
label: 'name',
value: 'name',
},
],
},
},
{
key: 'borderWidth',
help: 'Width of circle border.',
type: 'number',
required: false,
defaultValue: defaults.borderWidth,
controlType: 'lineWidth',
group: 'Style',
},
{
key: 'borderColor',
help: 'Method to compute border color.',
description: `
how to compute border color,
[see dedicated documentation](self:/guides/colors).
`,
type: 'string | object | Function',
required: false,
defaultValue: defaults.borderColor,
controlType: 'inheritedColor',
group: 'Style',
},
value: 'name',
},
{
label: 'd => d.color',
value: 'd => d.color',
},
],
},
},
{
key: 'borderWidth',
scopes: '*',
description: 'Width of circle border.',
type: '{number}',
required: false,
default: defaults.borderWidth,
controlType: 'range',
controlGroup: 'Style',
controlOptions: {
unit: 'px',
min: 0,
max: 10,
},
},
{
key: 'borderColor',
scopes: '*',
description: (
<span>
how to compute border color,{' '}
see dedicated documentation.
</span>
default: defaults.borderColor,
controlType: 'color',
controlGroup: 'Style',
controlOptions: {
withCustomColor: true,
},
},
...defsProperties(['Bubble']),
...marginProperties,
{
key: 'enableLabel',
scopes: '*',
description: 'Enable/disable labels.',
type: '{boolean}',
required: false,
default: defaults.enableLabel,
controlType: 'switch',
controlGroup: 'Labels',
},
{
key: 'label',
scopes: '*',
description:
'Defines how to get label text, can be a string (used to access current node data property) or a function which will receive the actual node data.',
type: '{string|Function}',
required: false,
default: defaults.label,
controlType: 'choices',
controlGroup: 'Labels',
controlOptions: {
choices: ['id', 'value', `d => \`\${d.id}: \${d.value}\``].map(choice => ({
label: choice,
how to compute border color,
[see dedicated documentation](self:/guides/colors).
`,
type: 'string | object | Function',
required: false,
defaultValue: defaults.borderColor,
controlType: 'inheritedColor',
group: 'Style',
},
...defsProperties('Style', ['svg']),
{
key: 'enableLabel',
help: 'Enable/disable labels.',
type: 'boolean',
required: false,
defaultValue: defaults.enableLabel,
controlType: 'switch',
group: 'Labels',
},
{
key: 'label',
help: 'Label accessor.',
description: `
Defines how to get label text,
can be a string (used to access current node data property)
or a function which will receive the actual node data.
`,
type: 'string | Function',
required: false,
defaultValue: defaults.label,
controlType: 'choices',
group: 'Labels',
description: 'The hierarchical data object.',
type: '{Object}',
required: true,
},
{
key: 'identity',
description: (
<span>
define value accessor, if string given, will use <code>datum[value]</code>,<br>
if function given, it will be invoked for each node and will receive the node as
first argument, it must return the node value.
</span>
),
type: '{string|Function}',
required: false,
default: defaults.identity,
},
{
key: 'value',
description: (
<span>
define value accessor, if string given, will use <code>datum[value]</code>,<br>
if function given, it will be invoked for each node and will receive the node as
first argument, it must return the node value.
</span>
),
type: '{string|Function}',
required: false,
default: 'value',
},
{
key: 'width',
type: 'object',
required: true,
group: 'Base',
},
{
key: 'identity',
help: 'Define id accessor.',
description: `
define id accessor, if string given, will use
\`datum[value]\`, if function given, it will be
invoked for each node and will receive the node as
first argument, it must return the node value.
`,
type: 'string | Function',
required: false,
defaultValue: defaults.identity,
group: 'Base',
},
{
key: 'value',
help: 'Define value accessor.',
description: `
define value accessor, if string given, will use
\`datum[value]\`, if function given, it will be
invoked for each node and will receive the node as
first argument, it must return the node value.
`,
type: 'string | Function',
required: false,
defaultValue: 'value',
group: 'Base',
},
default: defaults.labelSkipRadius,
controlType: 'range',
controlGroup: 'Labels',
controlOptions: {
unit: 'px',
min: 0,
max: 32,
},
},
{
key: 'isInteractive',
scopes: ['Bubble', 'BubbleHtml'],
description: 'Enable/disable interactivity.',
type: '{boolean}',
required: false,
default: defaults.isInteractive,
controlType: 'switch',
controlGroup: 'Interactivity',
},
{
key: 'isZoomable',
scopes: ['Bubble', 'BubbleHtml'],
description: `Enable/disable zooming ('isInteractive' must also be 'true').`,
type: '{boolean}',
required: false,
default: defaults.isZoomable,
controlType: 'switch',
controlGroup: 'Interactivity',
},
{
key: 'onClick',
scopes: ['Bubble', 'BubbleHtml'],
defaultValue: defaults.labelSkipRadius,
controlType: 'range',
group: 'Labels',
controlOptions: {
unit: 'px',
min: 0,
max: 32,
},
},
{
key: 'isInteractive',
flavors: ['svg', 'html'],
help: 'Enable/disable interactivity.',
type: 'boolean',
required: false,
defaultValue: defaults.isInteractive,
controlType: 'switch',
group: 'Interactivity',
},
{
key: 'isZoomable',
flavors: ['svg', 'html'],
help: `Enable/disable zooming ('isInteractive' must also be 'true').`,
type: 'boolean',
required: false,
defaultValue: defaults.isZoomable,
controlType: 'switch',
group: 'Interactivity',
},
{
key: 'onClick',
group: 'Interactivity',