UNPKG

@spaced-out/ui-design-system

Version:
60 lines (57 loc) 1.43 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getSpiderChartOptions = exports.bodySmallSecondary = void 0; var _color = require("../../styles/variables/_color"); var _charts = require("./charts"); var _helpers = require("./helpers"); var _typography = require("./typography"); const bodySmallSecondary = exports.bodySmallSecondary = { ..._typography.bodySmall, color: _color.colorTextSecondary }; /** * This function modifies the the common chart behavior to spider chart default behavior. * It will not take userPassed option into account. */ const getSpiderChartOptions = () => ({ ..._charts.commonChartOptions, chart: { ..._charts.commonChartOptions.chart, polar: true, type: 'line', spacing: [0, 0, 0, 0], margin: [0, 0, 0, 0] }, xAxis: { ..._charts.commonChartOptions.xAxis, labels: { style: bodySmallSecondary }, lineWidth: 0, tickmarkPlacement: 'on' }, yAxis: { labels: { style: bodySmallSecondary }, gridLineInterpolation: 'polygon', lineWidth: 0 }, legend: { ..._charts.commonChartOptions.legend, ..._helpers.rightLineLegendColumn, symbolWidth: 18 }, pane: { center: ['30%', '50%'], size: '70%' }, tooltip: { ..._charts.commonChartOptions.tooltip, followPointer: false, shared: true } }); exports.getSpiderChartOptions = getSpiderChartOptions;