UNPKG

@railzai/railz-visualizations

Version:
73 lines 2.21 kB
/*! * Accounting Data as a Service™ is the solution that makes sense of your business customers' financial data. * Built with Stencil * Copyright (c) FIS. */ /* eslint-disable @typescript-eslint/explicit-module-boundary-types */ import { ALL_FONTS } from '../../types'; export const getOptions = (data, options) => ({ chart: { type: 'line', backgroundColor: (options === null || options === void 0 ? void 0 : options.backgroundColor) || '#ffffff', height: (options === null || options === void 0 ? void 0 : options.height) || 60, reflow: true, marginTop: 0, spacingTop: 0, spacingRight: 0, marginRight: 0, style: Object.assign({ fontFamily: ALL_FONTS }, options === null || options === void 0 ? void 0 : options.style), events: { load() { // eslint-disable-next-line @typescript-eslint/no-this-alias const chart = this; setTimeout(() => { if (chart) { try { chart.reflow(); } catch (e) { } } }, 0); }, }, }, colors: (options === null || options === void 0 ? void 0 : options.colors) || ['#015B7E'], title: { text: undefined, }, xAxis: Object.assign({ labels: { enabled: false, }, visible: false, tickLength: 0 }, options === null || options === void 0 ? void 0 : options.xAxisStyle), yAxis: Object.assign({ gridLineDashStyle: 'longdash', title: { text: null, }, maxPadding: 0.1, minPadding: 0.1, tickAmount: 1, tickPositioner: function () { return [0]; }, endOnTick: false, startOnTick: false, softMin: -2, softMax: 2, labels: { style: Object.assign({ color: '#424242' }, options === null || options === void 0 ? void 0 : options.label), } }, options === null || options === void 0 ? void 0 : options.yAxisStyle), tooltip: { enabled: false, }, legend: { enabled: false, }, series: [ { data, }, ], plotOptions: { series: { enableMouseTracking: false, lineWidth: 3, shadow: false, marker: { radius: null, }, }, }, credits: { enabled: false, }, }); //# sourceMappingURL=sparkline-charts.utils.js.map