@spaced-out/ui-design-system
Version:
Sense UI components library
56 lines (55 loc) • 1.39 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getColumnChartOptions = exports.columnPlotWidth = void 0;
var _color = require("../../styles/variables/_color.js");
var _charts = require("./charts");
var _helpers = require("./helpers");
/**
* This function modifies the the common chart behavior to column chart default behavior.
* It will not take userPassed option into account.
*/
const getColumnChartOptions = () => ({
..._charts.commonChartOptions,
chart: {
..._charts.commonChartOptions.chart,
type: 'column'
},
legend: {
..._charts.commonChartOptions.legend,
..._helpers.bottomLegendRow,
symbolWidth: 18
},
xAxis: {
..._charts.commonChartOptions.xAxis,
labels: {
style: _helpers.xAxisLabelStyle
},
title: {
margin: 12,
style: _helpers.xAxisTitleStyle
},
lineColor: _color.colorBorderPrimary
},
yAxis: {
labels: {
align: 'right',
distance: 12,
style: _helpers.yAxisLabelStyle
},
title: {
margin: 12,
style: _helpers.yAxisTitleStyle
}
},
drilldown: {
activeAxisLabelStyle: _helpers.activeLabelStyle,
activeDataLabelStyle: _helpers.activeLabelStyle,
breadcrumbs: {
floating: true
}
}
});
exports.getColumnChartOptions = getColumnChartOptions;
const columnPlotWidth = exports.columnPlotWidth = 28;