@carbon/charts 0.54.7 → 0.54.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +41 -0
- package/build/src/interfaces/charts.d.ts +1 -0
- package/build/src/interfaces/components.d.ts +1 -0
- package/bundle.js +1 -1
- package/charts/meter.js +40 -21
- package/charts/meter.js.map +1 -1
- package/components/graphs/bar-stacked.js +2 -1
- package/components/graphs/bar-stacked.js.map +1 -1
- package/components/graphs/bar.js +3 -1
- package/components/graphs/bar.js.map +1 -1
- package/components/graphs/radar.js +6 -5
- package/components/graphs/radar.js.map +1 -1
- package/configuration.js +2 -0
- package/configuration.js.map +1 -1
- package/interfaces/charts.d.ts +1 -0
- package/interfaces/charts.js.map +1 -1
- package/interfaces/components.d.ts +1 -0
- package/interfaces/components.js.map +1 -1
- package/package.json +1 -1
- package/services/scales-cartesian.js +3 -2
- package/services/scales-cartesian.js.map +1 -1
- package/tsconfig.tsbuildinfo +11 -10
package/configuration.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configuration.js","sourceRoot":"","sources":["configuration.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO;AAqCN,QAAQ;AACR,UAAU,EACV,UAAU,EACV,eAAe,EACf,eAAe,EACf,mBAAmB,EACnB,YAAY,EACZ,cAAc,EACd,SAAS,EAET,aAAa,GACb,MAAM,cAAc,CAAC;AACtB,OAAO,gBAAgB,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAE9D;;;;GAIG;AAEH;;GAEG;AACH,IAAM,yBAAyB,GAAG;IACjC,IAAI,EAAE,eAAe,CAAC,QAAQ;IAC9B,SAAS,EAAE,EAAE;IACb,YAAY,EAAE,EAAE;CAChB,CAAC;AAEF;;GAEG;AACH,IAAM,MAAM,GAAkB;IAC7B,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AAG;IACtB,KAAK,OAAA;IACL,SAAS,WAAA;IACT,cAAc,gBAAA;IACd,eAAe,iBAAA;IACf,eAAe,iBAAA;IACf,YAAY,cAAA;IACZ,WAAW,aAAA;IACX,WAAW,aAAA;IACX,cAAc,gBAAA;IACd,SAAS,WAAA;IACT,SAAS,WAAA;IACT,gBAAgB,kBAAA;IAChB,YAAY,cAAA;IACZ,aAAa,eAAA;IACb,QAAQ,UAAA;IACR,UAAU,YAAA;IACV,UAAU,YAAA;IACV,sBAAsB,wBAAA;IACtB,UAAU,YAAA;IACV,UAAU,YAAA;IACV,UAAU,YAAA;IACV,SAAS,WAAA;IACT,YAAY,cAAA;IACZ,eAAe,iBAAA;IACf,cAAc,gBAAA;IACd,aAAa,eAAA;IACb,YAAY,cAAA;CACZ,CAAC;AAEF,cAAc,kCAAkC,CAAC","sourcesContent":["import { Tools } from './tools';\nimport {\n\tBaseChartOptions,\n\tAxisChartOptions,\n\tScatterChartOptions,\n\tLollipopChartOptions,\n\tLineChartOptions,\n\tBarChartOptions,\n\tStackedBarChartOptions,\n\tBoxplotChartOptions,\n\tAreaChartOptions,\n\tPieChartOptions,\n\tGaugeChartOptions,\n\tDonutChartOptions,\n\tBubbleChartOptions,\n\tBulletChartOptions,\n\tHistogramChartOptions,\n\tRadarChartOptions,\n\tComboChartOptions,\n\tTreeChartOptions,\n\tTreemapChartOptions,\n\tCirclePackChartOptions,\n\tWorldCloudChartOptions,\n\tAlluvialChartOptions,\n\t// Components\n\tAxisOptions,\n\tGridOptions,\n\tRulerOptions,\n\tAxesOptions,\n\tTimeScaleOptions,\n\tTooltipOptions,\n\tWordCloudChartTooltipOptions,\n\tLegendOptions,\n\tStackedBarOptions,\n\tMeterChartOptions,\n\tProportionalMeterChartOptions,\n\tToolbarOptions,\n\tZoomBarsOptions,\n\t// ENUMS\n\tAlignments,\n\tGaugeTypes,\n\tLegendPositions,\n\tTruncationTypes,\n\tToolbarControlTypes,\n\tZoomBarTypes,\n\tLegendItemType,\n\tTreeTypes,\n\tHeatmapChartOptions,\n\tDividerStatus,\n} from './interfaces';\nimport enUSLocaleObject from 'date-fns/locale/en-US/index';\nimport { circlePack } from './configuration-non-customizable';\n\n/*\n *****************************\n * User configurable options *\n *****************************\n */\n\n/**\n * Default truncation configuration\n */\nconst standardTruncationOptions = {\n\ttype: TruncationTypes.END_LINE,\n\tthreshold: 16,\n\tnumCharacter: 14,\n};\n\n/**\n * Legend options\n */\nconst legend: LegendOptions = {\n\tenabled: true,\n\tposition: LegendPositions.BOTTOM,\n\tclickable: true,\n\ttruncation: standardTruncationOptions,\n\talignment: Alignments.LEFT,\n\torder: null,\n\tadditionalItems: [],\n};\n\n/**\n * Grid options\n */\nexport const grid: GridOptions = {\n\tx: {\n\t\t// set enable to false will not draw grid and stroke of grid backdrop\n\t\tenabled: true,\n\t\tnumberOfTicks: 15,\n\t\talignWithAxisTicks: false,\n\t},\n\ty: {\n\t\t// set enable to false will not draw grid and stroke of grid backdrop\n\t\tenabled: true,\n\t\tnumberOfTicks: 5,\n\t\talignWithAxisTicks: false,\n\t},\n};\n\n/**\n * Ruler options\n */\nexport const ruler: RulerOptions = {\n\t// enable or disable ruler\n\tenabled: true,\n};\n\n/**\n * Tooltip options\n */\nexport const baseTooltip: TooltipOptions = {\n\tenabled: true,\n\tshowTotal: true,\n\ttruncation: standardTruncationOptions,\n\tgroupLabel: 'Group',\n};\n\n// These options will be managed by Tools.mergeDefaultChartOptions\n// by removing the ones the user is not providing,\n// and by TwoDimensionalAxes.\nconst axes: AxesOptions<AxisOptions> = {\n\ttop: {\n\t\tvisible: true,\n\t\tincludeZero: true,\n\t\ttruncation: standardTruncationOptions,\n\t},\n\tbottom: {\n\t\tvisible: true,\n\t\tincludeZero: true,\n\t\ttruncation: standardTruncationOptions,\n\t},\n\tleft: {\n\t\tvisible: true,\n\t\tincludeZero: true,\n\t\ttruncation: standardTruncationOptions,\n\t},\n\tright: {\n\t\tvisible: true,\n\t\tincludeZero: true,\n\t\ttruncation: standardTruncationOptions,\n\t},\n};\n\nexport const timeScale: TimeScaleOptions = {\n\taddSpaceOnEdges: 1,\n\tshowDayName: false,\n\tlocaleObject: enUSLocaleObject,\n\ttimeIntervalFormats: {\n\t\t'15seconds': { primary: 'MMM d, pp', secondary: 'pp' },\n\t\tminute: { primary: 'MMM d, p', secondary: 'p' },\n\t\t'30minutes': { primary: 'MMM d, p', secondary: 'p' },\n\t\thourly: { primary: 'MMM d, hh a', secondary: 'hh a' },\n\t\tdaily: { primary: 'MMM d', secondary: 'd' },\n\t\tweekly: { primary: 'eee, MMM d', secondary: 'eee' },\n\t\tmonthly: { primary: 'MMM yyyy', secondary: 'MMM' },\n\t\tquarterly: { primary: \"QQQ ''yy\", secondary: 'QQQ' },\n\t\tyearly: { primary: 'yyyy', secondary: 'yyyy' },\n\t},\n};\n\nconst isFullScreenEnabled =\n\ttypeof document !== 'undefined' &&\n\t(document['fullscreenEnabled'] ||\n\t\tdocument['webkitFullscreenEnabled'] ||\n\t\tdocument['mozFullScreenEnabled'] ||\n\t\tdocument['msFullscreenEnabled']);\n\n/**\n * Base chart options common to any chart\n */\nconst chart: BaseChartOptions = {\n\twidth: null,\n\theight: null,\n\tresizable: true,\n\ttooltip: baseTooltip,\n\tlegend,\n\tstyle: {\n\t\tprefix: 'cc',\n\t},\n\tdata: {\n\t\tgroupMapsTo: 'group',\n\t\tloading: false,\n\t\tselectedGroups: [],\n\t},\n\tcolor: {\n\t\tscale: null,\n\t\tpairing: {\n\t\t\tnumberOfVariants: null,\n\t\t\toption: 1,\n\t\t},\n\t\tgradient: {\n\t\t\tenabled: false,\n\t\t},\n\t},\n\ttoolbar: {\n\t\tenabled: true,\n\t\tnumberOfIcons: 3,\n\t\tcontrols: [\n\t\t\t{\n\t\t\t\ttype: ToolbarControlTypes.SHOW_AS_DATATABLE,\n\t\t\t},\n\t\t\t...(isFullScreenEnabled\n\t\t\t\t? [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: ToolbarControlTypes.MAKE_FULLSCREEN,\n\t\t\t\t\t\t},\n\t\t\t\t ]\n\t\t\t\t: []),\n\t\t\t{\n\t\t\t\ttype: ToolbarControlTypes.EXPORT_CSV,\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: ToolbarControlTypes.EXPORT_PNG,\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: ToolbarControlTypes.EXPORT_JPG,\n\t\t\t},\n\t\t],\n\t} as ToolbarOptions,\n};\n\n/**\n * Options common to any chart with an axis\n */\nconst axisChart: AxisChartOptions = Tools.merge({}, chart, {\n\taxes,\n\ttimeScale,\n\tgrid,\n\truler,\n\tzoomBar: {\n\t\tzoomRatio: 0.4,\n\t\tminZoomRatio: 0.01,\n\t\ttop: {\n\t\t\tenabled: false,\n\t\t\ttype: ZoomBarTypes.GRAPH_VIEW,\n\t\t},\n\t} as ZoomBarsOptions,\n} as AxisChartOptions);\n\n/**\n * options specific to simple bar charts\n */\nconst baseBarChart: BarChartOptions = Tools.merge({}, axisChart, {\n\tbars: {\n\t\tmaxWidth: 16,\n\t},\n\ttimeScale: Tools.merge(timeScale, {\n\t\taddSpaceOnEdges: 1,\n\t} as TimeScaleOptions),\n} as BarChartOptions);\n\n/**\n * options specific to simple bar charts\n */\nconst simpleBarChart: BarChartOptions = Tools.merge(\n\t{},\n\tbaseBarChart,\n\t{} as BarChartOptions\n);\n\n/**\n * options specific to simple bar charts\n */\nconst groupedBarChart: BarChartOptions = Tools.merge(\n\t{},\n\tbaseBarChart,\n\t{} as BarChartOptions\n);\n\n/**\n * options specific to stacked bar charts\n */\nconst stackedBarChart: StackedBarChartOptions = Tools.merge({}, baseBarChart, {\n\tbars: Tools.merge({}, baseBarChart.bars, {\n\t\tdividerSize: 1.5,\n\t} as StackedBarOptions),\n} as BarChartOptions);\n\n/**\n * options specific to boxplot charts\n */\nconst boxplotChart: BoxplotChartOptions = Tools.merge(\n\t{},\n\tbaseBarChart,\n\t{} as BarChartOptions\n);\n\n/**\n * options specific to scatter charts\n */\nconst scatterChart: ScatterChartOptions = Tools.merge({}, axisChart, {\n\tpoints: {\n\t\t// default point radius to 4\n\t\tradius: 4,\n\t\tfillOpacity: 0.3,\n\t\tfilled: true,\n\t\tenabled: true,\n\t},\n} as ScatterChartOptions);\n\n/**\n * options specific to lollipop charts\n */\nconst lollipopChart: LollipopChartOptions = scatterChart as LollipopChartOptions;\n\n/**\n * options specific to line charts\n */\nconst lineChart: LineChartOptions = Tools.merge({}, scatterChart, {\n\tpoints: {\n\t\t// default point radius to 3\n\t\tradius: 3,\n\t\tfilled: false,\n\t\tenabled: true,\n\t},\n} as LineChartOptions);\n\n/**\n * options specific to area charts\n */\nconst areaChart: AreaChartOptions = Tools.merge({}, lineChart, {\n\ttimeScale: Tools.merge(timeScale, {\n\t\taddSpaceOnEdges: 0,\n\t} as TimeScaleOptions),\n} as LineChartOptions);\n\n/**\n * options specific to stacked area charts\n */\nconst stackedAreaChart = areaChart;\n\n/**\n * options specific to bubble charts\n */\nconst bubbleChart: BubbleChartOptions = Tools.merge({}, axisChart, {\n\tbubble: {\n\t\tradiusMapsTo: 'radius',\n\t\tradiusLabel: 'Radius',\n\t\tradiusRange: (chartSize, data) => {\n\t\t\tconst smallerChartDimension = Math.min(\n\t\t\t\tchartSize.width,\n\t\t\t\tchartSize.height\n\t\t\t);\n\t\t\treturn [\n\t\t\t\t(smallerChartDimension * 3) / 400,\n\t\t\t\t(smallerChartDimension * 25) / 400,\n\t\t\t];\n\t\t},\n\t\tfillOpacity: 0.2,\n\t\tenabled: true,\n\t},\n\tpoints: {\n\t\tfilled: true,\n\t},\n\tlegend: {\n\t\tadditionalItems: [\n\t\t\t{\n\t\t\t\ttype: LegendItemType.RADIUS,\n\t\t\t\tname: 'Radius',\n\t\t\t},\n\t\t],\n\t},\n} as BubbleChartOptions);\n\n/**\n * options specific to bullet charts\n */\nconst bulletChart: BulletChartOptions = Tools.merge({}, axisChart, {\n\tbullet: {\n\t\tperformanceAreaTitles: ['Poor', 'Satisfactory', 'Great'],\n\t},\n\tgrid: {\n\t\tx: {\n\t\t\tenabled: false,\n\t\t},\n\t\ty: {\n\t\t\tenabled: false,\n\t\t},\n\t},\n\tlegend: {\n\t\tadditionalItems: [\n\t\t\t{\n\t\t\t\ttype: LegendItemType.AREA,\n\t\t\t\tname: 'Poor area',\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: LegendItemType.AREA,\n\t\t\t\tname: 'Satisfactory area',\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: LegendItemType.AREA,\n\t\t\t\tname: 'Great area',\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: LegendItemType.QUARTILE,\n\t\t\t\tname: 'Quartiles',\n\t\t\t},\n\t\t],\n\t},\n} as BulletChartOptions);\n\n/**\n * options specific to stacked bar charts\n */\nconst histogramChart: HistogramChartOptions = Tools.merge({}, baseBarChart, {\n\tbars: {\n\t\tdividerSize: 1.5,\n\t} as StackedBarOptions,\n\ttimeScale: Tools.merge(timeScale, {\n\t\taddSpaceOnEdges: 0,\n\t} as TimeScaleOptions),\n} as BarChartOptions);\n\n/*\n * options specific to word cloud charts\n */\nconst wordCloudChart: WorldCloudChartOptions = Tools.merge({}, chart, {\n\ttooltip: Tools.merge({}, baseTooltip, {\n\t\twordLabel: 'Word',\n\t\tvalueLabel: 'Value',\n\t}) as WordCloudChartTooltipOptions,\n\twordCloud: {\n\t\tfontSizeMapsTo: 'value',\n\t\tfontSizeRange: (chartSize, data) => {\n\t\t\tconst smallerChartDimension = Math.min(\n\t\t\t\tchartSize.width,\n\t\t\t\tchartSize.height\n\t\t\t);\n\t\t\treturn [\n\t\t\t\t(smallerChartDimension * 20) / 400,\n\t\t\t\t(smallerChartDimension * 75) / 400,\n\t\t\t];\n\t\t},\n\t\twordMapsTo: 'word',\n\t},\n} as WorldCloudChartOptions);\n\n/**\n * options specific to pie charts\n */\nconst pieChart: PieChartOptions = Tools.merge({}, chart, {\n\tpie: {\n\t\tlabels: {\n\t\t\tformatter: null,\n\t\t\tenabled: true,\n\t\t},\n\t\talignment: Alignments.LEFT,\n\t\tsortFunction: null,\n\t\tvalueMapsTo: 'value',\n\t},\n} as PieChartOptions);\n\n/**\n * options specific to gauge charts\n */\nconst gaugeChart: GaugeChartOptions = Tools.merge({}, chart, {\n\tlegend: {\n\t\tenabled: false,\n\t},\n\tgauge: {\n\t\ttype: GaugeTypes.SEMI,\n\t\tarcWidth: 16,\n\t\tdeltaArrow: {\n\t\t\tsize: (radius) => radius / 8,\n\t\t\tenabled: true,\n\t\t},\n\t\tshowPercentageSymbol: true,\n\t\tstatus: null,\n\t\tnumberSpacing: 10,\n\t\tdeltaFontSize: (radius) => radius / 8,\n\t\tvalueFontSize: (radius) => radius / 2.5,\n\t\tnumberFormatter: (number) =>\n\t\t\tnumber.toFixed(2) % 1 !== 0\n\t\t\t\t? number.toFixed(2).toLocaleString()\n\t\t\t\t: number.toFixed().toLocaleString(),\n\t\talignment: Alignments.LEFT,\n\t},\n} as GaugeChartOptions);\n\n/**\n * options specific to donut charts\n */\nconst donutChart: DonutChartOptions = Tools.merge({}, pieChart, {\n\tdonut: {\n\t\tcenter: {\n\t\t\tnumberFontSize: (radius) =>\n\t\t\t\tMath.min((radius / 100) * 24, 24) + 'px',\n\t\t\ttitleFontSize: (radius) => Math.min((radius / 100) * 15, 15) + 'px',\n\t\t\ttitleYPosition: (radius) => Math.min((radius / 80) * 20, 20),\n\t\t\tnumberFormatter: (number) => Math.floor(number).toLocaleString(),\n\t\t},\n\t\talignment: Alignments.LEFT,\n\t},\n} as DonutChartOptions);\n\nconst meterChart: MeterChartOptions = Tools.merge({}, chart, {\n\tlegend: {\n\t\tenabled: false,\n\t\tclickable: false,\n\t},\n\tmeter: {\n\t\tproportional: null,\n\t\tstatusBar: {\n\t\t\tpercentageIndicator: {\n\t\t\t\tenabled: true,\n\t\t\t},\n\t\t},\n\t},\n} as MeterChartOptions);\n\nconst proportionalMeterChart: ProportionalMeterChartOptions = Tools.merge(\n\t{},\n\tmeterChart,\n\t{\n\t\tlegend: {\n\t\t\tenabled: true,\n\t\t},\n\t} as MeterChartOptions\n);\n\n/**\n * options specific to radar charts\n */\nconst radarChart: RadarChartOptions = Tools.merge({}, chart, {\n\tradar: {\n\t\taxes: {\n\t\t\tangle: 'key',\n\t\t\tvalue: 'value',\n\t\t},\n\t\talignment: Alignments.LEFT,\n\t},\n\ttooltip: {\n\t\tgridline: {\n\t\t\tenabled: true,\n\t\t},\n\t\tvalueFormatter: (value) =>\n\t\t\tvalue !== null && value !== undefined ? value : 'N/A',\n\t},\n} as RadarChartOptions);\n\n/**\n * options specific to combo charts\n */\nconst comboChart: ComboChartOptions = Tools.merge({}, baseBarChart, {\n\tcomboChartTypes: [],\n} as ComboChartOptions);\n\n/*\n * options specific to tree charts\n */\nconst treeChart: TreeChartOptions = Tools.merge(\n\t{\n\t\ttree: {\n\t\t\ttype: TreeTypes.TREE,\n\t\t},\n\t},\n\tchart,\n\t{} as TreeChartOptions\n);\n\n/*\n * options specific to treemap charts\n */\nconst treemapChart: TreemapChartOptions = Tools.merge({}, chart, {\n\tdata: Tools.merge(chart.data, {\n\t\tgroupMapsTo: 'name',\n\t}),\n} as TreemapChartOptions);\n\n/*\n * options specific to circle pack charts\n */\nconst circlePackChart: CirclePackChartOptions = Tools.merge(\n\t{},\n\tchart,\n\tcirclePack,\n\t{\n\t\tdata: Tools.merge(chart.data, {\n\t\t\tgroupMapsTo: 'name',\n\t\t}),\n\t} as CirclePackChartOptions\n);\n\nconst alluvialChart: AlluvialChartOptions = Tools.merge({}, chart, {\n\talluvial: {\n\t\tdata: Tools.merge(chart.data, {\n\t\t\tgroupMapsTo: 'source',\n\t\t}),\n\t\tnodePadding: 24,\n\t\tmonochrome: false,\n\t\tnodes: [],\n\t},\n} as AlluvialChartOptions);\n\nconst heatmapChart: HeatmapChartOptions = Tools.merge({}, chart, {\n\taxes,\n\theatmap: {\n\t\tdivider: {\n\t\t\tstate: DividerStatus.AUTO,\n\t\t},\n\t\tcolorLegend: {\n\t\t\ttype: 'linear',\n\t\t},\n\t},\n} as HeatmapChartOptions);\n\nexport const options = {\n\tchart,\n\taxisChart,\n\tsimpleBarChart,\n\tgroupedBarChart,\n\tstackedBarChart,\n\tboxplotChart,\n\tbubbleChart,\n\tbulletChart,\n\thistogramChart,\n\tlineChart,\n\tareaChart,\n\tstackedAreaChart,\n\tscatterChart,\n\tlollipopChart,\n\tpieChart,\n\tdonutChart,\n\tmeterChart,\n\tproportionalMeterChart,\n\tradarChart,\n\tgaugeChart,\n\tcomboChart,\n\ttreeChart,\n\ttreemapChart,\n\tcirclePackChart,\n\twordCloudChart,\n\talluvialChart,\n\theatmapChart,\n};\n\nexport * from './configuration-non-customizable';\n"]}
|
|
1
|
+
{"version":3,"file":"configuration.js","sourceRoot":"","sources":["configuration.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO;AAqCN,QAAQ;AACR,UAAU,EACV,UAAU,EACV,eAAe,EACf,eAAe,EACf,mBAAmB,EACnB,YAAY,EACZ,cAAc,EACd,SAAS,EAET,aAAa,GACb,MAAM,cAAc,CAAC;AACtB,OAAO,gBAAgB,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAE9D;;;;GAIG;AAEH;;GAEG;AACH,IAAM,yBAAyB,GAAG;IACjC,IAAI,EAAE,eAAe,CAAC,QAAQ;IAC9B,SAAS,EAAE,EAAE;IACb,YAAY,EAAE,EAAE;CAChB,CAAC;AAEF;;GAEG;AACH,IAAM,MAAM,GAAkB;IAC7B,OAAO,EAAE,IAAI;IACb,QAAQ,EAAE,eAAe,CAAC,MAAM;IAChC,SAAS,EAAE,IAAI;IACf,UAAU,EAAE,yBAAyB;IACrC,SAAS,EAAE,UAAU,CAAC,IAAI;IAC1B,KAAK,EAAE,IAAI;IACX,eAAe,EAAE,EAAE;CACnB,CAAC;AAEF;;GAEG;AACH,MAAM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WAAA;IACT,SAAS,WAAA;IACT,gBAAgB,kBAAA;IAChB,YAAY,cAAA;IACZ,aAAa,eAAA;IACb,QAAQ,UAAA;IACR,UAAU,YAAA;IACV,UAAU,YAAA;IACV,sBAAsB,wBAAA;IACtB,UAAU,YAAA;IACV,UAAU,YAAA;IACV,UAAU,YAAA;IACV,SAAS,WAAA;IACT,YAAY,cAAA;IACZ,eAAe,iBAAA;IACf,cAAc,gBAAA;IACd,aAAa,eAAA;IACb,YAAY,cAAA;CACZ,CAAC;AAEF,cAAc,kCAAkC,CAAC","sourcesContent":["import { Tools } from './tools';\nimport {\n\tBaseChartOptions,\n\tAxisChartOptions,\n\tScatterChartOptions,\n\tLollipopChartOptions,\n\tLineChartOptions,\n\tBarChartOptions,\n\tStackedBarChartOptions,\n\tBoxplotChartOptions,\n\tAreaChartOptions,\n\tPieChartOptions,\n\tGaugeChartOptions,\n\tDonutChartOptions,\n\tBubbleChartOptions,\n\tBulletChartOptions,\n\tHistogramChartOptions,\n\tRadarChartOptions,\n\tComboChartOptions,\n\tTreeChartOptions,\n\tTreemapChartOptions,\n\tCirclePackChartOptions,\n\tWorldCloudChartOptions,\n\tAlluvialChartOptions,\n\t// Components\n\tAxisOptions,\n\tGridOptions,\n\tRulerOptions,\n\tAxesOptions,\n\tTimeScaleOptions,\n\tTooltipOptions,\n\tWordCloudChartTooltipOptions,\n\tLegendOptions,\n\tStackedBarOptions,\n\tMeterChartOptions,\n\tProportionalMeterChartOptions,\n\tToolbarOptions,\n\tZoomBarsOptions,\n\t// ENUMS\n\tAlignments,\n\tGaugeTypes,\n\tLegendPositions,\n\tTruncationTypes,\n\tToolbarControlTypes,\n\tZoomBarTypes,\n\tLegendItemType,\n\tTreeTypes,\n\tHeatmapChartOptions,\n\tDividerStatus,\n} from './interfaces';\nimport enUSLocaleObject from 'date-fns/locale/en-US/index';\nimport { circlePack } from './configuration-non-customizable';\n\n/*\n *****************************\n * User configurable options *\n *****************************\n */\n\n/**\n * Default truncation configuration\n */\nconst standardTruncationOptions = {\n\ttype: TruncationTypes.END_LINE,\n\tthreshold: 16,\n\tnumCharacter: 14,\n};\n\n/**\n * Legend options\n */\nconst legend: LegendOptions = {\n\tenabled: true,\n\tposition: LegendPositions.BOTTOM,\n\tclickable: true,\n\ttruncation: standardTruncationOptions,\n\talignment: Alignments.LEFT,\n\torder: null,\n\tadditionalItems: [],\n};\n\n/**\n * Grid options\n */\nexport const grid: GridOptions = {\n\tx: {\n\t\t// set enable to false will not draw grid and stroke of grid backdrop\n\t\tenabled: true,\n\t\tnumberOfTicks: 15,\n\t\talignWithAxisTicks: false,\n\t},\n\ty: {\n\t\t// set enable to false will not draw grid and stroke of grid backdrop\n\t\tenabled: true,\n\t\tnumberOfTicks: 5,\n\t\talignWithAxisTicks: false,\n\t},\n};\n\n/**\n * Ruler options\n */\nexport const ruler: RulerOptions = {\n\t// enable or disable ruler\n\tenabled: true,\n};\n\n/**\n * Tooltip options\n */\nexport const baseTooltip: TooltipOptions = {\n\tenabled: true,\n\tshowTotal: true,\n\ttruncation: standardTruncationOptions,\n\tgroupLabel: 'Group',\n};\n\n// These options will be managed by Tools.mergeDefaultChartOptions\n// by removing the ones the user is not providing,\n// and by TwoDimensionalAxes.\nconst axes: AxesOptions<AxisOptions> = {\n\ttop: {\n\t\tvisible: true,\n\t\tincludeZero: true,\n\t\ttruncation: standardTruncationOptions,\n\t},\n\tbottom: {\n\t\tvisible: true,\n\t\tincludeZero: true,\n\t\ttruncation: standardTruncationOptions,\n\t},\n\tleft: {\n\t\tvisible: true,\n\t\tincludeZero: true,\n\t\ttruncation: standardTruncationOptions,\n\t},\n\tright: {\n\t\tvisible: true,\n\t\tincludeZero: true,\n\t\ttruncation: standardTruncationOptions,\n\t},\n};\n\nexport const timeScale: TimeScaleOptions = {\n\taddSpaceOnEdges: 1,\n\tshowDayName: false,\n\tlocaleObject: enUSLocaleObject,\n\ttimeIntervalFormats: {\n\t\t'15seconds': { primary: 'MMM d, pp', secondary: 'pp' },\n\t\tminute: { primary: 'MMM d, p', secondary: 'p' },\n\t\t'30minutes': { primary: 'MMM d, p', secondary: 'p' },\n\t\thourly: { primary: 'MMM d, hh a', secondary: 'hh a' },\n\t\tdaily: { primary: 'MMM d', secondary: 'd' },\n\t\tweekly: { primary: 'eee, MMM d', secondary: 'eee' },\n\t\tmonthly: { primary: 'MMM yyyy', secondary: 'MMM' },\n\t\tquarterly: { primary: \"QQQ ''yy\", secondary: 'QQQ' },\n\t\tyearly: { primary: 'yyyy', secondary: 'yyyy' },\n\t},\n};\n\nconst isFullScreenEnabled =\n\ttypeof document !== 'undefined' &&\n\t(document['fullscreenEnabled'] ||\n\t\tdocument['webkitFullscreenEnabled'] ||\n\t\tdocument['mozFullScreenEnabled'] ||\n\t\tdocument['msFullscreenEnabled']);\n\n/**\n * Base chart options common to any chart\n */\nconst chart: BaseChartOptions = {\n\twidth: null,\n\theight: null,\n\tresizable: true,\n\ttooltip: baseTooltip,\n\tlegend,\n\tstyle: {\n\t\tprefix: 'cc',\n\t},\n\tdata: {\n\t\tgroupMapsTo: 'group',\n\t\tloading: false,\n\t\tselectedGroups: [],\n\t},\n\tcolor: {\n\t\tscale: null,\n\t\tpairing: {\n\t\t\tnumberOfVariants: null,\n\t\t\toption: 1,\n\t\t},\n\t\tgradient: {\n\t\t\tenabled: false,\n\t\t},\n\t},\n\ttoolbar: {\n\t\tenabled: true,\n\t\tnumberOfIcons: 3,\n\t\tcontrols: [\n\t\t\t{\n\t\t\t\ttype: ToolbarControlTypes.SHOW_AS_DATATABLE,\n\t\t\t},\n\t\t\t...(isFullScreenEnabled\n\t\t\t\t? [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: ToolbarControlTypes.MAKE_FULLSCREEN,\n\t\t\t\t\t\t},\n\t\t\t\t ]\n\t\t\t\t: []),\n\t\t\t{\n\t\t\t\ttype: ToolbarControlTypes.EXPORT_CSV,\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: ToolbarControlTypes.EXPORT_PNG,\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: ToolbarControlTypes.EXPORT_JPG,\n\t\t\t},\n\t\t],\n\t} as ToolbarOptions,\n};\n\n/**\n * Options common to any chart with an axis\n */\nconst axisChart: AxisChartOptions = Tools.merge({}, chart, {\n\taxes,\n\ttimeScale,\n\tgrid,\n\truler,\n\tzoomBar: {\n\t\tzoomRatio: 0.4,\n\t\tminZoomRatio: 0.01,\n\t\ttop: {\n\t\t\tenabled: false,\n\t\t\ttype: ZoomBarTypes.GRAPH_VIEW,\n\t\t},\n\t} as ZoomBarsOptions,\n} as AxisChartOptions);\n\n/**\n * options specific to simple bar charts\n */\nconst baseBarChart: BarChartOptions = Tools.merge({}, axisChart, {\n\tbars: {\n\t\tmaxWidth: 16,\n\t\tspacingFactor: 0.25\n\t},\n\ttimeScale: Tools.merge(timeScale, {\n\t\taddSpaceOnEdges: 1,\n\t} as TimeScaleOptions),\n} as BarChartOptions);\n\n/**\n * options specific to simple bar charts\n */\nconst simpleBarChart: BarChartOptions = Tools.merge(\n\t{},\n\tbaseBarChart,\n\t{} as BarChartOptions\n);\n\n/**\n * options specific to simple bar charts\n */\nconst groupedBarChart: BarChartOptions = Tools.merge(\n\t{},\n\tbaseBarChart,\n\t{} as BarChartOptions\n);\n\n/**\n * options specific to stacked bar charts\n */\nconst stackedBarChart: StackedBarChartOptions = Tools.merge({}, baseBarChart, {\n\tbars: Tools.merge({}, baseBarChart.bars, {\n\t\tdividerSize: 1.5,\n\t} as StackedBarOptions),\n} as BarChartOptions);\n\n/**\n * options specific to boxplot charts\n */\nconst boxplotChart: BoxplotChartOptions = Tools.merge(\n\t{},\n\tbaseBarChart,\n\t{} as BarChartOptions\n);\n\n/**\n * options specific to scatter charts\n */\nconst scatterChart: ScatterChartOptions = Tools.merge({}, axisChart, {\n\tpoints: {\n\t\t// default point radius to 4\n\t\tradius: 4,\n\t\tfillOpacity: 0.3,\n\t\tfilled: true,\n\t\tenabled: true,\n\t},\n} as ScatterChartOptions);\n\n/**\n * options specific to lollipop charts\n */\nconst lollipopChart: LollipopChartOptions = scatterChart as LollipopChartOptions;\n\n/**\n * options specific to line charts\n */\nconst lineChart: LineChartOptions = Tools.merge({}, scatterChart, {\n\tpoints: {\n\t\t// default point radius to 3\n\t\tradius: 3,\n\t\tfilled: false,\n\t\tenabled: true,\n\t},\n} as LineChartOptions);\n\n/**\n * options specific to area charts\n */\nconst areaChart: AreaChartOptions = Tools.merge({}, lineChart, {\n\ttimeScale: Tools.merge(timeScale, {\n\t\taddSpaceOnEdges: 0,\n\t} as TimeScaleOptions),\n} as LineChartOptions);\n\n/**\n * options specific to stacked area charts\n */\nconst stackedAreaChart = areaChart;\n\n/**\n * options specific to bubble charts\n */\nconst bubbleChart: BubbleChartOptions = Tools.merge({}, axisChart, {\n\tbubble: {\n\t\tradiusMapsTo: 'radius',\n\t\tradiusLabel: 'Radius',\n\t\tradiusRange: (chartSize, data) => {\n\t\t\tconst smallerChartDimension = Math.min(\n\t\t\t\tchartSize.width,\n\t\t\t\tchartSize.height\n\t\t\t);\n\t\t\treturn [\n\t\t\t\t(smallerChartDimension * 3) / 400,\n\t\t\t\t(smallerChartDimension * 25) / 400,\n\t\t\t];\n\t\t},\n\t\tfillOpacity: 0.2,\n\t\tenabled: true,\n\t},\n\tpoints: {\n\t\tfilled: true,\n\t},\n\tlegend: {\n\t\tadditionalItems: [\n\t\t\t{\n\t\t\t\ttype: LegendItemType.RADIUS,\n\t\t\t\tname: 'Radius',\n\t\t\t},\n\t\t],\n\t},\n} as BubbleChartOptions);\n\n/**\n * options specific to bullet charts\n */\nconst bulletChart: BulletChartOptions = Tools.merge({}, axisChart, {\n\tbullet: {\n\t\tperformanceAreaTitles: ['Poor', 'Satisfactory', 'Great'],\n\t},\n\tgrid: {\n\t\tx: {\n\t\t\tenabled: false,\n\t\t},\n\t\ty: {\n\t\t\tenabled: false,\n\t\t},\n\t},\n\tlegend: {\n\t\tadditionalItems: [\n\t\t\t{\n\t\t\t\ttype: LegendItemType.AREA,\n\t\t\t\tname: 'Poor area',\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: LegendItemType.AREA,\n\t\t\t\tname: 'Satisfactory area',\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: LegendItemType.AREA,\n\t\t\t\tname: 'Great area',\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: LegendItemType.QUARTILE,\n\t\t\t\tname: 'Quartiles',\n\t\t\t},\n\t\t],\n\t},\n} as BulletChartOptions);\n\n/**\n * options specific to stacked bar charts\n */\nconst histogramChart: HistogramChartOptions = Tools.merge({}, baseBarChart, {\n\tbars: {\n\t\tdividerSize: 1.5,\n\t} as StackedBarOptions,\n\ttimeScale: Tools.merge(timeScale, {\n\t\taddSpaceOnEdges: 0,\n\t} as TimeScaleOptions),\n} as BarChartOptions);\n\n/*\n * options specific to word cloud charts\n */\nconst wordCloudChart: WorldCloudChartOptions = Tools.merge({}, chart, {\n\ttooltip: Tools.merge({}, baseTooltip, {\n\t\twordLabel: 'Word',\n\t\tvalueLabel: 'Value',\n\t}) as WordCloudChartTooltipOptions,\n\twordCloud: {\n\t\tfontSizeMapsTo: 'value',\n\t\tfontSizeRange: (chartSize, data) => {\n\t\t\tconst smallerChartDimension = Math.min(\n\t\t\t\tchartSize.width,\n\t\t\t\tchartSize.height\n\t\t\t);\n\t\t\treturn [\n\t\t\t\t(smallerChartDimension * 20) / 400,\n\t\t\t\t(smallerChartDimension * 75) / 400,\n\t\t\t];\n\t\t},\n\t\twordMapsTo: 'word',\n\t},\n} as WorldCloudChartOptions);\n\n/**\n * options specific to pie charts\n */\nconst pieChart: PieChartOptions = Tools.merge({}, chart, {\n\tpie: {\n\t\tlabels: {\n\t\t\tformatter: null,\n\t\t\tenabled: true,\n\t\t},\n\t\talignment: Alignments.LEFT,\n\t\tsortFunction: null,\n\t\tvalueMapsTo: 'value',\n\t},\n} as PieChartOptions);\n\n/**\n * options specific to gauge charts\n */\nconst gaugeChart: GaugeChartOptions = Tools.merge({}, chart, {\n\tlegend: {\n\t\tenabled: false,\n\t},\n\tgauge: {\n\t\ttype: GaugeTypes.SEMI,\n\t\tarcWidth: 16,\n\t\tdeltaArrow: {\n\t\t\tsize: (radius) => radius / 8,\n\t\t\tenabled: true,\n\t\t},\n\t\tshowPercentageSymbol: true,\n\t\tstatus: null,\n\t\tnumberSpacing: 10,\n\t\tdeltaFontSize: (radius) => radius / 8,\n\t\tvalueFontSize: (radius) => radius / 2.5,\n\t\tnumberFormatter: (number) =>\n\t\t\tnumber.toFixed(2) % 1 !== 0\n\t\t\t\t? number.toFixed(2).toLocaleString()\n\t\t\t\t: number.toFixed().toLocaleString(),\n\t\talignment: Alignments.LEFT,\n\t},\n} as GaugeChartOptions);\n\n/**\n * options specific to donut charts\n */\nconst donutChart: DonutChartOptions = Tools.merge({}, pieChart, {\n\tdonut: {\n\t\tcenter: {\n\t\t\tnumberFontSize: (radius) =>\n\t\t\t\tMath.min((radius / 100) * 24, 24) + 'px',\n\t\t\ttitleFontSize: (radius) => Math.min((radius / 100) * 15, 15) + 'px',\n\t\t\ttitleYPosition: (radius) => Math.min((radius / 80) * 20, 20),\n\t\t\tnumberFormatter: (number) => Math.floor(number).toLocaleString(),\n\t\t},\n\t\talignment: Alignments.LEFT,\n\t},\n} as DonutChartOptions);\n\nconst meterChart: MeterChartOptions = Tools.merge({}, chart, {\n\tlegend: {\n\t\tenabled: false,\n\t\tclickable: false,\n\t},\n\tmeter: {\n\t\tshowLabels: true,\n\t\tproportional: null,\n\t\tstatusBar: {\n\t\t\tpercentageIndicator: {\n\t\t\t\tenabled: true,\n\t\t\t},\n\t\t},\n\t},\n} as MeterChartOptions);\n\nconst proportionalMeterChart: ProportionalMeterChartOptions = Tools.merge(\n\t{},\n\tmeterChart,\n\t{\n\t\tlegend: {\n\t\t\tenabled: true,\n\t\t},\n\t} as MeterChartOptions\n);\n\n/**\n * options specific to radar charts\n */\nconst radarChart: RadarChartOptions = Tools.merge({}, chart, {\n\tradar: {\n\t\taxes: {\n\t\t\tangle: 'key',\n\t\t\tvalue: 'value',\n\t\t},\n\t\talignment: Alignments.LEFT,\n\t},\n\ttooltip: {\n\t\tgridline: {\n\t\t\tenabled: true,\n\t\t},\n\t\tvalueFormatter: (value) =>\n\t\t\tvalue !== null && value !== undefined ? value : 'N/A',\n\t},\n} as RadarChartOptions);\n\n/**\n * options specific to combo charts\n */\nconst comboChart: ComboChartOptions = Tools.merge({}, baseBarChart, {\n\tcomboChartTypes: [],\n} as ComboChartOptions);\n\n/*\n * options specific to tree charts\n */\nconst treeChart: TreeChartOptions = Tools.merge(\n\t{\n\t\ttree: {\n\t\t\ttype: TreeTypes.TREE,\n\t\t},\n\t},\n\tchart,\n\t{} as TreeChartOptions\n);\n\n/*\n * options specific to treemap charts\n */\nconst treemapChart: TreemapChartOptions = Tools.merge({}, chart, {\n\tdata: Tools.merge(chart.data, {\n\t\tgroupMapsTo: 'name',\n\t}),\n} as TreemapChartOptions);\n\n/*\n * options specific to circle pack charts\n */\nconst circlePackChart: CirclePackChartOptions = Tools.merge(\n\t{},\n\tchart,\n\tcirclePack,\n\t{\n\t\tdata: Tools.merge(chart.data, {\n\t\t\tgroupMapsTo: 'name',\n\t\t}),\n\t} as CirclePackChartOptions\n);\n\nconst alluvialChart: AlluvialChartOptions = Tools.merge({}, chart, {\n\talluvial: {\n\t\tdata: Tools.merge(chart.data, {\n\t\t\tgroupMapsTo: 'source',\n\t\t}),\n\t\tnodePadding: 24,\n\t\tmonochrome: false,\n\t\tnodes: [],\n\t},\n} as AlluvialChartOptions);\n\nconst heatmapChart: HeatmapChartOptions = Tools.merge({}, chart, {\n\taxes,\n\theatmap: {\n\t\tdivider: {\n\t\t\tstate: DividerStatus.AUTO,\n\t\t},\n\t\tcolorLegend: {\n\t\t\ttype: 'linear',\n\t\t},\n\t},\n} as HeatmapChartOptions);\n\nexport const options = {\n\tchart,\n\taxisChart,\n\tsimpleBarChart,\n\tgroupedBarChart,\n\tstackedBarChart,\n\tboxplotChart,\n\tbubbleChart,\n\tbulletChart,\n\thistogramChart,\n\tlineChart,\n\tareaChart,\n\tstackedAreaChart,\n\tscatterChart,\n\tlollipopChart,\n\tpieChart,\n\tdonutChart,\n\tmeterChart,\n\tproportionalMeterChart,\n\tradarChart,\n\tgaugeChart,\n\tcomboChart,\n\ttreeChart,\n\ttreemapChart,\n\tcirclePackChart,\n\twordCloudChart,\n\talluvialChart,\n\theatmapChart,\n};\n\nexport * from './configuration-non-customizable';\n"]}
|
package/interfaces/charts.d.ts
CHANGED
package/interfaces/charts.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"charts.js","sourceRoot":"","sources":["charts.ts"],"names":[],"mappings":"","sourcesContent":["import {\n\tGaugeTypes,\n\tStatuses,\n\tArrowDirections,\n\tAlignments,\n\tChartTypes,\n\tTreeTypes,\n\tDividerStatus,\n\tColorLegendType,\n} from './enums';\nimport {\n\tLegendOptions,\n\tTooltipOptions,\n\tGridOptions,\n\tAxesOptions,\n\tZoomBarsOptions,\n} from './index';\nimport { BarOptions, StackedBarOptions, ToolbarOptions } from './components';\nimport {\n\tAxisOptions,\n\tBinnedAxisOptions,\n\tTimeScaleOptions,\n} from './axis-scales';\n\n/**\n * Base chart options common to any chart\n */\nexport interface BaseChartOptions {\n\t/**\n\t * Optionally specify a title for the chart\n\t */\n\ttitle?: string;\n\t/**\n\t * boolean to disable animations (enabled by default)\n\t */\n\tanimations?: boolean;\n\t/**\n\t * boolean to prevent the container from resizing\n\t */\n\tresizable?: boolean;\n\t/**\n\t * Optionally specify a width for the chart\n\t */\n\twidth?: string;\n\t/**\n\t * Optionally specify a height for the chart\n\t */\n\theight?: string;\n\t/**\n\t * tooltip configuration\n\t */\n\ttooltip?: TooltipOptions;\n\t/**\n\t * legend configuration\n\t */\n\tlegend?: LegendOptions;\n\t/**\n\t * toolbar configurations\n\t */\n\ttoolbar?: ToolbarOptions;\n\t/**\n\t * Optional function to determine whether is filled based on datasetLabel, label, and/or data\n\t */\n\tgetIsFilled?: (\n\t\tdatasetLabel: any,\n\t\tlabel?: any,\n\t\tdata?: any,\n\t\tdefaultFilled?: boolean\n\t) => boolean;\n\t/**\n\t * Optional function to generate the fill color based on datasetLabel, label, and/or data\n\t */\n\tgetFillColor?: (\n\t\tgroup: string,\n\t\tlabel?: string,\n\t\tdata?: any,\n\t\tdefaultFillColor?: string\n\t) => string;\n\t/**\n\t * Optional function to generate the stroke color based on datasetLabel, label, and/or data\n\t * (note) - not all chart types support the stroke color (e.g. wordcloud)\n\t */\n\tgetStrokeColor?: (\n\t\tgroup: string,\n\t\tlabel?: any,\n\t\tdata?: any,\n\t\tdefaultStrokeColor?: string\n\t) => string;\n\t/**\n\t * stylesheet options\n\t */\n\tstyle?: {\n\t\t/**\n\t\t * optional prefixing string for css classes (defaults to 'cc')\n\t\t */\n\t\tprefix?: string;\n\t};\n\t/**\n\t * options related to charting data\n\t */\n\tdata?: {\n\t\t/**\n\t\t * identifier for data groups\n\t\t */\n\t\tgroupMapsTo?: string;\n\t\t/**\n\t\t * used to simulate data loading in skeleton way\n\t\t */\n\t\tloading?: boolean;\n\t\t/**\n\t\t * options related to pre-selected data groups\n\t\t * Remains empty if every legend item is active or dataset doesn't have the data groups.\n\t\t */\n\t\tselectedGroups?: string[];\n\t};\n\t/**\n\t * options related to color scales\n\t */\n\tcolor?: {\n\t\t/**\n\t\t * e.g. { 'Dataset 1': 'blue' }\n\t\t */\n\t\tscale?: object;\n\t\t/**\n\t\t * use a carbon dataviz preset color palette\n\t\t * put the index (selection of which variant)\n\t\t */\n\t\tpairing?: {\n\t\t\t/**\n\t\t\t * the number of color variants in the palette (defaults to using the number of data groups in the given data)\n\t\t\t */\n\t\t\tnumberOfVariants?: number;\n\t\t\t/**\n\t\t\t * the option number of the color paring\n\t\t\t */\n\t\t\toption?: number;\n\t\t};\n\t\t/*\n\t\t * options related to gradient\n\t\t * e.g. { enabled: true }\n\t\t */\n\t\tgradient?: {\n\t\t\tenabled?: boolean;\n\t\t\t/**\n\t\t\t * hex color array\n\t\t\t * e.g. ['#fff', '#000', ...]\n\t\t\t */\n\t\t\tcolors?: Array<String>;\n\t\t};\n\t};\n}\n\n/**\n * Options common to any chart with an axis\n */\nexport interface AxisChartOptions extends BaseChartOptions {\n\taxes?: AxesOptions<AxisOptions>;\n\tgrid?: GridOptions;\n\ttimeScale?: TimeScaleOptions;\n\t/**\n\t * zoombar configuration\n\t */\n\tzoomBar?: ZoomBarsOptions;\n}\n\n/**\n * Options common to binned charts with an axis\n */\nexport interface BinnedAxisChartOptions extends AxisChartOptions {\n\taxes?: AxesOptions<BinnedAxisOptions>;\n\tgrid?: GridOptions;\n\ttimeScale?: TimeScaleOptions;\n\t/**\n\t * zoombar configuration\n\t */\n\tzoomBar?: ZoomBarsOptions;\n}\n\n/**\n * options specific to boxplot charts\n */\nexport interface BoxplotChartOptions extends AxisChartOptions {}\n\n/**\n * options specific to bar charts\n */\nexport interface BarChartOptions extends AxisChartOptions {\n\tbars?: BarOptions;\n}\n\n/**\n * options specific to stacked bar charts\n */\nexport interface StackedBarChartOptions extends BarChartOptions {\n\tbars?: StackedBarOptions;\n}\n\n/**\n * options specific to scatter charts\n */\nexport interface ScatterChartOptions extends AxisChartOptions {\n\t/**\n\t * options for the points\n\t */\n\tpoints?: {\n\t\t/**\n\t\t * sets the radius of the point\n\t\t */\n\t\tradius: number;\n\t\tfillOpacity?: number;\n\t\tfilled?: boolean;\n\t\tenabled?: boolean;\n\t};\n}\n\n/**\n * options specific to lollipop charts\n */\nexport interface LollipopChartOptions extends ScatterChartOptions {}\n\n/**\n * options specific to bubble charts\n */\nexport interface BubbleChartOptions extends AxisChartOptions {\n\t/**\n\t * options for the individual bubbles\n\t */\n\tbubble?: {\n\t\t/**\n\t\t * the key to lookup in charting data for the bubble radius value\n\t\t */\n\t\tradiusMapsTo?: string;\n\t\t/**\n\t\t * options for what the bubble radius value maps to\n\t\t */\n\t\tradiusLabel?: string;\n\t\t/**\n\t\t * A function that would determine the range of the bubble radius to use\n\t\t * Returns an array with the 1st value being the min and the 2nd value being the max radius\n\t\t */\n\t\tradiusRange?: Function;\n\t\t/**\n\t\t * Opacity of the fills used within each circle\n\t\t */\n\t\tfillOpacity?: number;\n\t\t/**\n\t\t * enabled scatter dot or not\n\t\t */\n\t\tenabled?: boolean;\n\t};\n}\n\n/**\n * options specific to bullet charts\n */\nexport interface BulletChartOptions extends AxisChartOptions {\n\t/**\n\t * options for the individual bullets\n\t */\n\tbullet?: {\n\t\tperformanceAreaTitles?: string[];\n\t};\n}\n\n/**\n * options specific to histogram charts\n */\nexport interface HistogramChartOptions extends AxisChartOptions {\n\t/**\n\t * options related to bins\n\t */\n\tbins?: {\n\t\trangeLabel?: string;\n\t};\n}\n\n/**\n * options specific to line charts\n */\nexport interface LineChartOptions extends ScatterChartOptions {\n\t/**\n\t * options for the curve of the line\n\t */\n\tcurve?:\n\t\t| string\n\t\t| {\n\t\t\t\tname: string;\n\t\t };\n}\n\n/**\n * options specific to area charts\n */\nexport interface AreaChartOptions extends AxisChartOptions {\n\t/**\n\t * options for the curve of the line\n\t */\n\tcurve?:\n\t\t| string\n\t\t| {\n\t\t\t\tname: string;\n\t\t };\n\t/**\n\t * options to bound the area of the chart\n\t */\n\tbounds?: {\n\t\tupperBoundMapsTo?: string;\n\t\tlowerBoundMapsTo?: string;\n\t};\n}\n\n/**\n * options specific to area charts\n */\nexport interface StackedAreaChartOptions extends ScatterChartOptions {\n\t/**\n\t * options for the curve of the line\n\t */\n\tcurve?:\n\t\t| string\n\t\t| {\n\t\t\t\tname: string;\n\t\t };\n}\n\n/**\n * options specific to world cloud charts\n */\nexport interface WordCloudChartTooltipOptions extends TooltipOptions {\n\t/** the label that shows up by the highlighted word in the tooltip */\n\twordLabel?: string;\n\t/** the label that shows up by the value of the highlighted word in the tooltip */\n\tvalueLabel?: string;\n}\n\nexport interface WorldCloudChartOptions extends BaseChartOptions {\n\twordCloud?: {\n\t\t/** what key in your charting data will the font sizes map to? */\n\t\tfontSizeMapsTo?: string;\n\t\t/** a function (chartSize, data) => {} that'll decide the range of font sizes, e.g. [10, 80] */\n\t\tfontSizeRange?: Function;\n\t\t/** what key in your charting data will the words map to? */\n\t\twordMapsTo?: string;\n\t};\n\t/**\n\t * tooltip configuration\n\t */\n\ttooltip?: WordCloudChartTooltipOptions;\n}\n\n/**\n * options specific to pie charts\n */\nexport interface PieChartOptions extends BaseChartOptions {\n\tpie?: {\n\t\tlabels?: {\n\t\t\tformatter?: Function;\n\t\t\tenabled?: Boolean;\n\t\t};\n\t\talignment?: Alignments;\n\t\t/**\n\t\t * identifier for value key in your charting data\n\t\t * defaults to value\n\t\t */\n\t\tvalueMapsTo?: string;\n\t\tsortFunction?: (a: any, b: any) => number;\n\t};\n}\n\n/**\n * options specific to gauge charts\n */\nexport interface GaugeChartOptions extends BaseChartOptions {\n\tgauge?: {\n\t\tarcWidth?: number;\n\t\tdeltaArrow?: {\n\t\t\tdirection?: ArrowDirections;\n\t\t\tsize?: Function;\n\t\t\tenabled: Boolean;\n\t\t};\n\t\tshowPercentageSymbol?: Boolean;\n\t\tstatus?: Statuses;\n\t\tdeltaFontSize?: Function;\n\t\tnumberSpacing?: number;\n\t\tnumberFormatter?: Function;\n\t\tvalueFontSize?: Function;\n\t\ttype?: GaugeTypes;\n\t\talignment?: Alignments;\n\t};\n}\n\n/**\n * options specific to donut charts\n */\nexport interface DonutChartOptions extends PieChartOptions {\n\tdonut?: {\n\t\tcenter?: {\n\t\t\tlabel?: string;\n\t\t\tnumber?: number;\n\t\t\tnumberFontSize?: Function;\n\t\t\ttitleFontSize?: Function;\n\t\t\ttitleYPosition?: Function;\n\t\t\tnumberFormatter?: Function;\n\t\t};\n\t\talignment?: Alignments;\n\t};\n}\n\nexport interface MeterChartOptions extends BaseChartOptions {\n\tmeter?: {\n\t\tproportional?: {\n\t\t\ttotal?: number;\n\t\t\tunit?: string;\n\t\t};\n\t\tpeak?: number;\n\t\tstatus?: {\n\t\t\tranges: Array<{\n\t\t\t\trange: [number, number];\n\t\t\t\tstatus: Statuses;\n\t\t\t}>;\n\t\t};\n\t\theight?: number;\n\t\ttitle?: {\n\t\t\tpercentageIndicator?: {\n\t\t\t\t/**\n\t\t\t\t * rendering of the percentage value relative to the dataset within title\n\t\t\t\t */\n\t\t\t\tenabled?: boolean;\n\t\t\t};\n\t\t};\n\t};\n}\n\nexport interface ProportionalMeterChartOptions extends BaseChartOptions {\n\tmeter?: {\n\t\tproportional?: {\n\t\t\ttotal?: number;\n\t\t\tunit?: string;\n\t\t};\n\t};\n}\n\n/**\n * options specific to radar charts\n */\nexport interface RadarChartOptions extends BaseChartOptions {\n\tradar?: {\n\t\taxes: {\n\t\t\tangle: string;\n\t\t\tvalue: string;\n\t\t};\n\t\talignment?: Alignments;\n\t};\n}\n\n/**\n * options specific to combo charts\n */\nexport interface ComboChartOptions extends AxisChartOptions {\n\tcomboChartTypes: Array<{\n\t\ttype: ChartTypes | any;\n\t\toptions?: object;\n\t\tcorrespondingDatasets: Array<string>;\n\t}>;\n}\n\n/*\n * options specific to treemap charts\n */\nexport interface TreemapChartOptions extends BaseChartOptions {}\n\n/*\n * options specific to tree charts\n */\nexport interface TreeChartOptions extends BaseChartOptions {\n\ttree?: {\n\t\ttype?: TreeTypes;\n\t\trootTitle?: string;\n\t};\n}\n\n/*\n * options specific to circle pack charts\n */\nexport interface CirclePackChartOptions extends BaseChartOptions {\n\tcirclePack?: {\n\t\tcircles: {\n\t\t\tfillOpacity: number;\n\t\t};\n\t\t// depth of nodes to display\n\t\thierachyLevel: number;\n\t\tpadding?: {\n\t\t\touter?: number;\n\t\t\tinner?: number;\n\t\t};\n\t};\n}\n\n/**\n * options specific to Alluvial charts\n */\nexport interface AlluvialChartOptions extends BaseChartOptions {\n\talluvial: {\n\t\tunits?: string;\n\t\t/**\n\t\t * List of nodes to draw\n\t\t */\n\t\tnodes: Array<{\n\t\t\tname: string;\n\t\t\tcategory?: string;\n\t\t}>;\n\t\t/**\n\t\t * Set the node padding\n\t\t */\n\t\tnodePadding?: number;\n\t\t/**\n\t\t * Enable single color usage for lines\n\t\t */\n\t\tmonochrome?: boolean;\n\t};\n}\n\n/**\n * options specific to Heatmap charts\n */\nexport interface HeatmapChartOptions extends BaseChartOptions {\n\theatmap: {\n\t\t/**\n\t\t * Divider width state - will default to auto\n\t\t * No cell divider for cell dimensions less than 16\n\t\t */\n\t\tdivider?: {\n\t\t\tstate?: DividerStatus;\n\t\t};\n\t\t/**\n\t\t * customize color legend\n\t\t * enabled by default on select charts\n\t\t */\n\t\tcolorLegend?: {\n\t\t\t/**\n\t\t\t * Text to display beside or on top of the legend\n\t\t\t * Position is determined by text length\n\t\t\t */\n\t\t\ttitle?: string;\n\t\t\ttype: ColorLegendType;\n\t\t};\n\t};\n}\n"]}
|
|
1
|
+
{"version":3,"file":"charts.js","sourceRoot":"","sources":["charts.ts"],"names":[],"mappings":"","sourcesContent":["import {\n\tGaugeTypes,\n\tStatuses,\n\tArrowDirections,\n\tAlignments,\n\tChartTypes,\n\tTreeTypes,\n\tDividerStatus,\n\tColorLegendType,\n} from './enums';\nimport {\n\tLegendOptions,\n\tTooltipOptions,\n\tGridOptions,\n\tAxesOptions,\n\tZoomBarsOptions,\n} from './index';\nimport { BarOptions, StackedBarOptions, ToolbarOptions } from './components';\nimport {\n\tAxisOptions,\n\tBinnedAxisOptions,\n\tTimeScaleOptions,\n} from './axis-scales';\n\n/**\n * Base chart options common to any chart\n */\nexport interface BaseChartOptions {\n\t/**\n\t * Optionally specify a title for the chart\n\t */\n\ttitle?: string;\n\t/**\n\t * boolean to disable animations (enabled by default)\n\t */\n\tanimations?: boolean;\n\t/**\n\t * boolean to prevent the container from resizing\n\t */\n\tresizable?: boolean;\n\t/**\n\t * Optionally specify a width for the chart\n\t */\n\twidth?: string;\n\t/**\n\t * Optionally specify a height for the chart\n\t */\n\theight?: string;\n\t/**\n\t * tooltip configuration\n\t */\n\ttooltip?: TooltipOptions;\n\t/**\n\t * legend configuration\n\t */\n\tlegend?: LegendOptions;\n\t/**\n\t * toolbar configurations\n\t */\n\ttoolbar?: ToolbarOptions;\n\t/**\n\t * Optional function to determine whether is filled based on datasetLabel, label, and/or data\n\t */\n\tgetIsFilled?: (\n\t\tdatasetLabel: any,\n\t\tlabel?: any,\n\t\tdata?: any,\n\t\tdefaultFilled?: boolean\n\t) => boolean;\n\t/**\n\t * Optional function to generate the fill color based on datasetLabel, label, and/or data\n\t */\n\tgetFillColor?: (\n\t\tgroup: string,\n\t\tlabel?: string,\n\t\tdata?: any,\n\t\tdefaultFillColor?: string\n\t) => string;\n\t/**\n\t * Optional function to generate the stroke color based on datasetLabel, label, and/or data\n\t * (note) - not all chart types support the stroke color (e.g. wordcloud)\n\t */\n\tgetStrokeColor?: (\n\t\tgroup: string,\n\t\tlabel?: any,\n\t\tdata?: any,\n\t\tdefaultStrokeColor?: string\n\t) => string;\n\t/**\n\t * stylesheet options\n\t */\n\tstyle?: {\n\t\t/**\n\t\t * optional prefixing string for css classes (defaults to 'cc')\n\t\t */\n\t\tprefix?: string;\n\t};\n\t/**\n\t * options related to charting data\n\t */\n\tdata?: {\n\t\t/**\n\t\t * identifier for data groups\n\t\t */\n\t\tgroupMapsTo?: string;\n\t\t/**\n\t\t * used to simulate data loading in skeleton way\n\t\t */\n\t\tloading?: boolean;\n\t\t/**\n\t\t * options related to pre-selected data groups\n\t\t * Remains empty if every legend item is active or dataset doesn't have the data groups.\n\t\t */\n\t\tselectedGroups?: string[];\n\t};\n\t/**\n\t * options related to color scales\n\t */\n\tcolor?: {\n\t\t/**\n\t\t * e.g. { 'Dataset 1': 'blue' }\n\t\t */\n\t\tscale?: object;\n\t\t/**\n\t\t * use a carbon dataviz preset color palette\n\t\t * put the index (selection of which variant)\n\t\t */\n\t\tpairing?: {\n\t\t\t/**\n\t\t\t * the number of color variants in the palette (defaults to using the number of data groups in the given data)\n\t\t\t */\n\t\t\tnumberOfVariants?: number;\n\t\t\t/**\n\t\t\t * the option number of the color paring\n\t\t\t */\n\t\t\toption?: number;\n\t\t};\n\t\t/*\n\t\t * options related to gradient\n\t\t * e.g. { enabled: true }\n\t\t */\n\t\tgradient?: {\n\t\t\tenabled?: boolean;\n\t\t\t/**\n\t\t\t * hex color array\n\t\t\t * e.g. ['#fff', '#000', ...]\n\t\t\t */\n\t\t\tcolors?: Array<String>;\n\t\t};\n\t};\n}\n\n/**\n * Options common to any chart with an axis\n */\nexport interface AxisChartOptions extends BaseChartOptions {\n\taxes?: AxesOptions<AxisOptions>;\n\tgrid?: GridOptions;\n\ttimeScale?: TimeScaleOptions;\n\t/**\n\t * zoombar configuration\n\t */\n\tzoomBar?: ZoomBarsOptions;\n}\n\n/**\n * Options common to binned charts with an axis\n */\nexport interface BinnedAxisChartOptions extends AxisChartOptions {\n\taxes?: AxesOptions<BinnedAxisOptions>;\n\tgrid?: GridOptions;\n\ttimeScale?: TimeScaleOptions;\n\t/**\n\t * zoombar configuration\n\t */\n\tzoomBar?: ZoomBarsOptions;\n}\n\n/**\n * options specific to boxplot charts\n */\nexport interface BoxplotChartOptions extends AxisChartOptions {}\n\n/**\n * options specific to bar charts\n */\nexport interface BarChartOptions extends AxisChartOptions {\n\tbars?: BarOptions;\n}\n\n/**\n * options specific to stacked bar charts\n */\nexport interface StackedBarChartOptions extends BarChartOptions {\n\tbars?: StackedBarOptions;\n}\n\n/**\n * options specific to scatter charts\n */\nexport interface ScatterChartOptions extends AxisChartOptions {\n\t/**\n\t * options for the points\n\t */\n\tpoints?: {\n\t\t/**\n\t\t * sets the radius of the point\n\t\t */\n\t\tradius: number;\n\t\tfillOpacity?: number;\n\t\tfilled?: boolean;\n\t\tenabled?: boolean;\n\t};\n}\n\n/**\n * options specific to lollipop charts\n */\nexport interface LollipopChartOptions extends ScatterChartOptions {}\n\n/**\n * options specific to bubble charts\n */\nexport interface BubbleChartOptions extends AxisChartOptions {\n\t/**\n\t * options for the individual bubbles\n\t */\n\tbubble?: {\n\t\t/**\n\t\t * the key to lookup in charting data for the bubble radius value\n\t\t */\n\t\tradiusMapsTo?: string;\n\t\t/**\n\t\t * options for what the bubble radius value maps to\n\t\t */\n\t\tradiusLabel?: string;\n\t\t/**\n\t\t * A function that would determine the range of the bubble radius to use\n\t\t * Returns an array with the 1st value being the min and the 2nd value being the max radius\n\t\t */\n\t\tradiusRange?: Function;\n\t\t/**\n\t\t * Opacity of the fills used within each circle\n\t\t */\n\t\tfillOpacity?: number;\n\t\t/**\n\t\t * enabled scatter dot or not\n\t\t */\n\t\tenabled?: boolean;\n\t};\n}\n\n/**\n * options specific to bullet charts\n */\nexport interface BulletChartOptions extends AxisChartOptions {\n\t/**\n\t * options for the individual bullets\n\t */\n\tbullet?: {\n\t\tperformanceAreaTitles?: string[];\n\t};\n}\n\n/**\n * options specific to histogram charts\n */\nexport interface HistogramChartOptions extends AxisChartOptions {\n\t/**\n\t * options related to bins\n\t */\n\tbins?: {\n\t\trangeLabel?: string;\n\t};\n}\n\n/**\n * options specific to line charts\n */\nexport interface LineChartOptions extends ScatterChartOptions {\n\t/**\n\t * options for the curve of the line\n\t */\n\tcurve?:\n\t\t| string\n\t\t| {\n\t\t\t\tname: string;\n\t\t };\n}\n\n/**\n * options specific to area charts\n */\nexport interface AreaChartOptions extends AxisChartOptions {\n\t/**\n\t * options for the curve of the line\n\t */\n\tcurve?:\n\t\t| string\n\t\t| {\n\t\t\t\tname: string;\n\t\t };\n\t/**\n\t * options to bound the area of the chart\n\t */\n\tbounds?: {\n\t\tupperBoundMapsTo?: string;\n\t\tlowerBoundMapsTo?: string;\n\t};\n}\n\n/**\n * options specific to area charts\n */\nexport interface StackedAreaChartOptions extends ScatterChartOptions {\n\t/**\n\t * options for the curve of the line\n\t */\n\tcurve?:\n\t\t| string\n\t\t| {\n\t\t\t\tname: string;\n\t\t };\n}\n\n/**\n * options specific to world cloud charts\n */\nexport interface WordCloudChartTooltipOptions extends TooltipOptions {\n\t/** the label that shows up by the highlighted word in the tooltip */\n\twordLabel?: string;\n\t/** the label that shows up by the value of the highlighted word in the tooltip */\n\tvalueLabel?: string;\n}\n\nexport interface WorldCloudChartOptions extends BaseChartOptions {\n\twordCloud?: {\n\t\t/** what key in your charting data will the font sizes map to? */\n\t\tfontSizeMapsTo?: string;\n\t\t/** a function (chartSize, data) => {} that'll decide the range of font sizes, e.g. [10, 80] */\n\t\tfontSizeRange?: Function;\n\t\t/** what key in your charting data will the words map to? */\n\t\twordMapsTo?: string;\n\t};\n\t/**\n\t * tooltip configuration\n\t */\n\ttooltip?: WordCloudChartTooltipOptions;\n}\n\n/**\n * options specific to pie charts\n */\nexport interface PieChartOptions extends BaseChartOptions {\n\tpie?: {\n\t\tlabels?: {\n\t\t\tformatter?: Function;\n\t\t\tenabled?: Boolean;\n\t\t};\n\t\talignment?: Alignments;\n\t\t/**\n\t\t * identifier for value key in your charting data\n\t\t * defaults to value\n\t\t */\n\t\tvalueMapsTo?: string;\n\t\tsortFunction?: (a: any, b: any) => number;\n\t};\n}\n\n/**\n * options specific to gauge charts\n */\nexport interface GaugeChartOptions extends BaseChartOptions {\n\tgauge?: {\n\t\tarcWidth?: number;\n\t\tdeltaArrow?: {\n\t\t\tdirection?: ArrowDirections;\n\t\t\tsize?: Function;\n\t\t\tenabled: Boolean;\n\t\t};\n\t\tshowPercentageSymbol?: Boolean;\n\t\tstatus?: Statuses;\n\t\tdeltaFontSize?: Function;\n\t\tnumberSpacing?: number;\n\t\tnumberFormatter?: Function;\n\t\tvalueFontSize?: Function;\n\t\ttype?: GaugeTypes;\n\t\talignment?: Alignments;\n\t};\n}\n\n/**\n * options specific to donut charts\n */\nexport interface DonutChartOptions extends PieChartOptions {\n\tdonut?: {\n\t\tcenter?: {\n\t\t\tlabel?: string;\n\t\t\tnumber?: number;\n\t\t\tnumberFontSize?: Function;\n\t\t\ttitleFontSize?: Function;\n\t\t\ttitleYPosition?: Function;\n\t\t\tnumberFormatter?: Function;\n\t\t};\n\t\talignment?: Alignments;\n\t};\n}\n\nexport interface MeterChartOptions extends BaseChartOptions {\n\tmeter?: {\n\t\tshowLabels?: boolean;\n\t\tproportional?: {\n\t\t\ttotal?: number;\n\t\t\tunit?: string;\n\t\t};\n\t\tpeak?: number;\n\t\tstatus?: {\n\t\t\tranges: Array<{\n\t\t\t\trange: [number, number];\n\t\t\t\tstatus: Statuses;\n\t\t\t}>;\n\t\t};\n\t\theight?: number;\n\t\ttitle?: {\n\t\t\tpercentageIndicator?: {\n\t\t\t\t/**\n\t\t\t\t * rendering of the percentage value relative to the dataset within title\n\t\t\t\t */\n\t\t\t\tenabled?: boolean;\n\t\t\t};\n\t\t};\n\t};\n}\n\nexport interface ProportionalMeterChartOptions extends BaseChartOptions {\n\tmeter?: {\n\t\tproportional?: {\n\t\t\ttotal?: number;\n\t\t\tunit?: string;\n\t\t};\n\t};\n}\n\n/**\n * options specific to radar charts\n */\nexport interface RadarChartOptions extends BaseChartOptions {\n\tradar?: {\n\t\taxes: {\n\t\t\tangle: string;\n\t\t\tvalue: string;\n\t\t};\n\t\talignment?: Alignments;\n\t};\n}\n\n/**\n * options specific to combo charts\n */\nexport interface ComboChartOptions extends AxisChartOptions {\n\tcomboChartTypes: Array<{\n\t\ttype: ChartTypes | any;\n\t\toptions?: object;\n\t\tcorrespondingDatasets: Array<string>;\n\t}>;\n}\n\n/*\n * options specific to treemap charts\n */\nexport interface TreemapChartOptions extends BaseChartOptions {}\n\n/*\n * options specific to tree charts\n */\nexport interface TreeChartOptions extends BaseChartOptions {\n\ttree?: {\n\t\ttype?: TreeTypes;\n\t\trootTitle?: string;\n\t};\n}\n\n/*\n * options specific to circle pack charts\n */\nexport interface CirclePackChartOptions extends BaseChartOptions {\n\tcirclePack?: {\n\t\tcircles: {\n\t\t\tfillOpacity: number;\n\t\t};\n\t\t// depth of nodes to display\n\t\thierachyLevel: number;\n\t\tpadding?: {\n\t\t\touter?: number;\n\t\t\tinner?: number;\n\t\t};\n\t};\n}\n\n/**\n * options specific to Alluvial charts\n */\nexport interface AlluvialChartOptions extends BaseChartOptions {\n\talluvial: {\n\t\tunits?: string;\n\t\t/**\n\t\t * List of nodes to draw\n\t\t */\n\t\tnodes: Array<{\n\t\t\tname: string;\n\t\t\tcategory?: string;\n\t\t}>;\n\t\t/**\n\t\t * Set the node padding\n\t\t */\n\t\tnodePadding?: number;\n\t\t/**\n\t\t * Enable single color usage for lines\n\t\t */\n\t\tmonochrome?: boolean;\n\t};\n}\n\n/**\n * options specific to Heatmap charts\n */\nexport interface HeatmapChartOptions extends BaseChartOptions {\n\theatmap: {\n\t\t/**\n\t\t * Divider width state - will default to auto\n\t\t * No cell divider for cell dimensions less than 16\n\t\t */\n\t\tdivider?: {\n\t\t\tstate?: DividerStatus;\n\t\t};\n\t\t/**\n\t\t * customize color legend\n\t\t * enabled by default on select charts\n\t\t */\n\t\tcolorLegend?: {\n\t\t\t/**\n\t\t\t * Text to display beside or on top of the legend\n\t\t\t * Position is determined by text length\n\t\t\t */\n\t\t\ttitle?: string;\n\t\t\ttype: ColorLegendType;\n\t\t};\n\t};\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components.js","sourceRoot":"","sources":["components.ts"],"names":[],"mappings":"","sourcesContent":["import {\n\tLayoutGrowth,\n\tLegendPositions,\n\tAlignments,\n\tToolbarControlTypes,\n\tZoomBarTypes,\n\tColorLegendType,\n} from './enums';\nimport { Component } from '../components/component';\nimport { TruncationOptions } from './truncation';\n\n/**\n * customize the overlay contents\n */\nexport interface LayoutComponentChild {\n\tid: string;\n\t/**\n\t * the component that'll be rendered inside layout child\n\t */\n\tcomponents: Component[];\n\t/**\n\t * size of the layout child\n\t */\n\tsize?: number;\n\t/**\n\t * how the layout child will grow or shrink\n\t */\n\tgrowth: LayoutGrowth;\n}\n\n/**\n * customize the legend component\n */\nexport interface LegendOptions {\n\tenabled?: boolean;\n\tposition?: LegendPositions;\n\t/**\n\t * the clickability of legend items\n\t */\n\tclickable?: boolean;\n\ttruncation?: TruncationOptions;\n\talignment?: Alignments;\n\torder?: string[];\n\t/**\n\t * customized legend items\n\t */\n\tadditionalItems?: LegendItem[];\n}\n\n/**\n * customize the legend item\n */\nexport interface LegendItem {\n\ttype: string;\n\tname: string;\n\tfill?: string;\n\tstroke?: string;\n}\n\nexport interface TooltipOptions {\n\t/**\n\t * enable or disable tooltip\n\t */\n\tenabled?: boolean;\n\t/**\n\t * a function to format the tooltip values\n\t */\n\tvalueFormatter?: Function;\n\t/**\n\t * custom function for returning tooltip HTML\n\t * passed an array or object with the data, and then the default tooltip markup\n\t */\n\tcustomHTML?: Function;\n\t/**\n\t * customizes the `Group` label shown inside tooltips\n\t */\n\tgroupLabel?: string;\n\t/**\n\t * show total of items\n\t */\n\tshowTotal?: boolean;\n\t/**\n\t * customizes the `Total` label shown inside tooltips\n\t */\n\ttotalLabel?: string;\n\ttruncation?: TruncationOptions;\n}\n\n/**\n * Threshold options\n */\nexport interface ThresholdOptions {\n\t/**\n\t * threshold value\n\t */\n\tvalue: number | Date;\n\t/**\n\t * a function to format the threshold values\n\t */\n\tvalueFormatter?: Function;\n\t/**\n\t * hex threshold line color\n\t */\n\tfillColor: string;\n\t/**\n\t * threshold label\n\t */\n\tlabel: string;\n}\n\nexport interface GridOptions {\n\ty?: {\n\t\tenabled?: boolean;\n\t\tnumberOfTicks?: number;\n\t\talignWithAxisTicks?: boolean;\n\t};\n\tx?: {\n\t\tenabled?: boolean;\n\t\tnumberOfTicks?: number;\n\t\talignWithAxisTicks?: boolean;\n\t};\n}\n\n/**\n * Ruler options\n */\nexport interface RulerOptions {\n\tenabled?: boolean;\n}\n\nexport interface BarOptions {\n\twidth?: number;\n\tmaxWidth?: number;\n}\n\nexport interface StackedBarOptions extends BarOptions {\n\tdividerSize?: number;\n}\n\n/**\n * customize the Toolbar component\n */\nexport interface ToolbarOptions {\n\t/**\n\t * is the toolbar visible or not\n\t */\n\tenabled?: boolean;\n\t/**\n\t * the maximum toolbar controls to be displayed as icons\n\t * controls more than this number will appear in the overflow menu\n\t * minimum is 1. (all toolbar controls are in overflow menu)\n\t */\n\tnumberOfIcons?: number;\n\t/**\n\t * toolbar controls which will be displayed following the array order\n\t */\n\tcontrols?: ToolbarControl[];\n}\n\n/**\n * options for each toolbar control\n */\nexport interface ToolbarControl {\n\t/**\n\t * the toolbar control type\n\t */\n\ttype: ToolbarControlTypes;\n\t/**\n\t * the text to display (if this control is displayed in overflow menu)\n\t * type value will be displayed if text is not available\n\t */\n\ttext?: string;\n\t/**\n\t * custom id for button\n\t */\n\tid?: String;\n\t/**\n\t * SVG HTML element\n\t */\n\ticonSVG?: {\n\t\tcontent?: string;\n\t\theight?: string;\n\t\twidth?: string;\n\t};\n\tshouldBeDisabled?: Function;\n\t/**\n\t * function to execute on button click\n\t * alternatively, users can choose to not pass in a function and can\n\t * listen for events to execute asynchronously\n\t */\n\tclickFunction?: Function;\n}\n\n/**\n * customize the ZoomBars in a chart\n */\nexport interface ZoomBarsOptions {\n\t/**\n\t * a variable to handle default zoom in ratio (0 ~ 1.0)\n\t * ex: shift click zoom in ratio\n\t */\n\tzoomRatio?: number;\n\t/**\n\t * a variable to define the minimum zoom ratio (0 ~ 1.0)\n\t * If ( zoom domain / max domain ) < minZoomRatio, zoom-in functions will be disabled\n\t */\n\tminZoomRatio?: number;\n\t/**\n\t * currently only the top position is supported\n\t */\n\ttop?: ZoomBarOptions;\n\t/**\n\t * whether keep updating range axis in real time while zoom domain is changing\n\t */\n\tupdateRangeAxis?: boolean;\n}\n\n/**\n * customize the ZoomBar component\n */\nexport interface ZoomBarOptions {\n\t/**\n\t * is the zoom-bar visible or not\n\t */\n\tenabled?: boolean;\n\t/**\n\t * is the zoom-bar in loading state\n\t */\n\tloading?: boolean;\n\t/**\n\t * is the zoom-bar in locked state\n\t */\n\tlocked?: boolean;\n\t/**\n\t * whether the zoom bar is showing a slider view or a graph view etc.\n\t */\n\ttype?: ZoomBarTypes;\n\t/**\n\t * an two element array which represents the initial zoom domain\n\t */\n\tinitialZoomDomain?: Object[];\n\t/**\n\t * options related to zoom bar data\n\t */\n\tdata?: Object[];\n}\n"]}
|
|
1
|
+
{"version":3,"file":"components.js","sourceRoot":"","sources":["components.ts"],"names":[],"mappings":"","sourcesContent":["import {\n\tLayoutGrowth,\n\tLegendPositions,\n\tAlignments,\n\tToolbarControlTypes,\n\tZoomBarTypes,\n\tColorLegendType,\n} from './enums';\nimport { Component } from '../components/component';\nimport { TruncationOptions } from './truncation';\n\n/**\n * customize the overlay contents\n */\nexport interface LayoutComponentChild {\n\tid: string;\n\t/**\n\t * the component that'll be rendered inside layout child\n\t */\n\tcomponents: Component[];\n\t/**\n\t * size of the layout child\n\t */\n\tsize?: number;\n\t/**\n\t * how the layout child will grow or shrink\n\t */\n\tgrowth: LayoutGrowth;\n}\n\n/**\n * customize the legend component\n */\nexport interface LegendOptions {\n\tenabled?: boolean;\n\tposition?: LegendPositions;\n\t/**\n\t * the clickability of legend items\n\t */\n\tclickable?: boolean;\n\ttruncation?: TruncationOptions;\n\talignment?: Alignments;\n\torder?: string[];\n\t/**\n\t * customized legend items\n\t */\n\tadditionalItems?: LegendItem[];\n}\n\n/**\n * customize the legend item\n */\nexport interface LegendItem {\n\ttype: string;\n\tname: string;\n\tfill?: string;\n\tstroke?: string;\n}\n\nexport interface TooltipOptions {\n\t/**\n\t * enable or disable tooltip\n\t */\n\tenabled?: boolean;\n\t/**\n\t * a function to format the tooltip values\n\t */\n\tvalueFormatter?: Function;\n\t/**\n\t * custom function for returning tooltip HTML\n\t * passed an array or object with the data, and then the default tooltip markup\n\t */\n\tcustomHTML?: Function;\n\t/**\n\t * customizes the `Group` label shown inside tooltips\n\t */\n\tgroupLabel?: string;\n\t/**\n\t * show total of items\n\t */\n\tshowTotal?: boolean;\n\t/**\n\t * customizes the `Total` label shown inside tooltips\n\t */\n\ttotalLabel?: string;\n\ttruncation?: TruncationOptions;\n}\n\n/**\n * Threshold options\n */\nexport interface ThresholdOptions {\n\t/**\n\t * threshold value\n\t */\n\tvalue: number | Date;\n\t/**\n\t * a function to format the threshold values\n\t */\n\tvalueFormatter?: Function;\n\t/**\n\t * hex threshold line color\n\t */\n\tfillColor: string;\n\t/**\n\t * threshold label\n\t */\n\tlabel: string;\n}\n\nexport interface GridOptions {\n\ty?: {\n\t\tenabled?: boolean;\n\t\tnumberOfTicks?: number;\n\t\talignWithAxisTicks?: boolean;\n\t};\n\tx?: {\n\t\tenabled?: boolean;\n\t\tnumberOfTicks?: number;\n\t\talignWithAxisTicks?: boolean;\n\t};\n}\n\n/**\n * Ruler options\n */\nexport interface RulerOptions {\n\tenabled?: boolean;\n}\n\nexport interface BarOptions {\n\twidth?: number;\n\tmaxWidth?: number;\n\t/*\n\t * can be used to manually modify spacing between bars\n\t * @default 0.25\n\t */\n\tspacingFactor?: number;\n}\n\nexport interface StackedBarOptions extends BarOptions {\n\tdividerSize?: number;\n}\n\n/**\n * customize the Toolbar component\n */\nexport interface ToolbarOptions {\n\t/**\n\t * is the toolbar visible or not\n\t */\n\tenabled?: boolean;\n\t/**\n\t * the maximum toolbar controls to be displayed as icons\n\t * controls more than this number will appear in the overflow menu\n\t * minimum is 1. (all toolbar controls are in overflow menu)\n\t */\n\tnumberOfIcons?: number;\n\t/**\n\t * toolbar controls which will be displayed following the array order\n\t */\n\tcontrols?: ToolbarControl[];\n}\n\n/**\n * options for each toolbar control\n */\nexport interface ToolbarControl {\n\t/**\n\t * the toolbar control type\n\t */\n\ttype: ToolbarControlTypes;\n\t/**\n\t * the text to display (if this control is displayed in overflow menu)\n\t * type value will be displayed if text is not available\n\t */\n\ttext?: string;\n\t/**\n\t * custom id for button\n\t */\n\tid?: String;\n\t/**\n\t * SVG HTML element\n\t */\n\ticonSVG?: {\n\t\tcontent?: string;\n\t\theight?: string;\n\t\twidth?: string;\n\t};\n\tshouldBeDisabled?: Function;\n\t/**\n\t * function to execute on button click\n\t * alternatively, users can choose to not pass in a function and can\n\t * listen for events to execute asynchronously\n\t */\n\tclickFunction?: Function;\n}\n\n/**\n * customize the ZoomBars in a chart\n */\nexport interface ZoomBarsOptions {\n\t/**\n\t * a variable to handle default zoom in ratio (0 ~ 1.0)\n\t * ex: shift click zoom in ratio\n\t */\n\tzoomRatio?: number;\n\t/**\n\t * a variable to define the minimum zoom ratio (0 ~ 1.0)\n\t * If ( zoom domain / max domain ) < minZoomRatio, zoom-in functions will be disabled\n\t */\n\tminZoomRatio?: number;\n\t/**\n\t * currently only the top position is supported\n\t */\n\ttop?: ZoomBarOptions;\n\t/**\n\t * whether keep updating range axis in real time while zoom domain is changing\n\t */\n\tupdateRangeAxis?: boolean;\n}\n\n/**\n * customize the ZoomBar component\n */\nexport interface ZoomBarOptions {\n\t/**\n\t * is the zoom-bar visible or not\n\t */\n\tenabled?: boolean;\n\t/**\n\t * is the zoom-bar in loading state\n\t */\n\tloading?: boolean;\n\t/**\n\t * is the zoom-bar in locked state\n\t */\n\tlocked?: boolean;\n\t/**\n\t * whether the zoom bar is showing a slider view or a graph view etc.\n\t */\n\ttype?: ZoomBarTypes;\n\t/**\n\t * an two element array which represents the initial zoom domain\n\t */\n\tinitialZoomDomain?: Object[];\n\t/**\n\t * options related to zoom bar data\n\t */\n\tdata?: Object[];\n}\n"]}
|
package/package.json
CHANGED
|
@@ -263,10 +263,11 @@ var CartesianScales = /** @class */ (function (_super) {
|
|
|
263
263
|
};
|
|
264
264
|
CartesianScales.prototype.getBoundedScaledValues = function (datum, index) {
|
|
265
265
|
var bounds = this.model.getOptions().bounds;
|
|
266
|
-
var
|
|
266
|
+
var axisPosition = this.getRangeAxisPosition({ datum: datum });
|
|
267
|
+
var scale = this.scales[axisPosition];
|
|
267
268
|
var options = this.model.getOptions();
|
|
268
269
|
var axesOptions = Tools.getProperty(options, 'axes');
|
|
269
|
-
var axisOptions = axesOptions[
|
|
270
|
+
var axisOptions = axesOptions[axisPosition];
|
|
270
271
|
var mapsTo = axisOptions.mapsTo;
|
|
271
272
|
var value = datum[mapsTo] !== undefined ? datum[mapsTo] : datum;
|
|
272
273
|
var boundedValues = [
|
|
@@ -1 +1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AAC,CAAC;AAC7B,CAAC","sourcesContent":["// Internal Imports\nimport * as Configuration from '../configuration';\nimport { Service } from './service';\nimport {\n\tAxisPositions,\n\tCartesianOrientations,\n\tScaleTypes,\n\tThresholdOptions,\n} from '../interfaces';\nimport { Tools } from '../tools';\n\n// D3 Imports\nimport { scaleBand, scaleLinear, scaleTime, scaleLog } from 'd3-scale';\nimport { extent, max } from 'd3-array';\n\n// Misc\nimport {\n\tdifferenceInYears,\n\taddYears,\n\tsubYears,\n\tdifferenceInMonths,\n\taddMonths,\n\tsubMonths,\n\tdifferenceInDays,\n\taddDays,\n\tsubDays,\n\tdifferenceInHours,\n\taddHours,\n\tsubHours,\n\tdifferenceInMinutes,\n\taddMinutes,\n\tsubMinutes,\n\tdifferenceInSeconds,\n\tsubSeconds,\n\taddSeconds,\n} from 'date-fns';\n\nexport class CartesianScales extends Service {\n\tprotected scaleTypes = {\n\t\ttop: null,\n\t\tright: null,\n\t\tbottom: null,\n\t\tleft: null,\n\t};\n\n\tprotected scales = {\n\t\ttop: null,\n\t\tright: null,\n\t\tbottom: null,\n\t\tleft: null,\n\t};\n\n\tprotected domainAxisPosition: AxisPositions;\n\tprotected rangeAxisPosition: AxisPositions;\n\tprotected secondaryDomainAxisPosition: AxisPositions;\n\tprotected secondaryRangeAxisPosition: AxisPositions;\n\n\tprotected dualAxes: Boolean;\n\n\tprotected orientation: CartesianOrientations;\n\n\tgetDomainAxisPosition({ datum = null } = {}) {\n\t\tif (this.dualAxes && datum) {\n\t\t\tconst options = this.model.getOptions();\n\t\t\tconst { groupMapsTo } = options.data;\n\t\t\tconst axesOptions = Tools.getProperty(\n\t\t\t\toptions,\n\t\t\t\t'axes',\n\t\t\t\tthis.secondaryDomainAxisPosition\n\t\t\t);\n\t\t\tconst dataset = datum[groupMapsTo];\n\t\t\tif (\n\t\t\t\taxesOptions?.correspondingDatasets &&\n\t\t\t\taxesOptions.correspondingDatasets.includes(dataset)\n\t\t\t) {\n\t\t\t\treturn this.secondaryDomainAxisPosition;\n\t\t\t}\n\t\t}\n\t\treturn this.domainAxisPosition;\n\t}\n\n\tgetRangeAxisPosition({ datum = null, groups = null } = {}) {\n\t\tif (this.dualAxes) {\n\t\t\tconst options = this.model.getOptions();\n\t\t\tconst { groupMapsTo } = options.data;\n\t\t\tconst axisOptions = Tools.getProperty(\n\t\t\t\toptions,\n\t\t\t\t'axes',\n\t\t\t\tthis.secondaryRangeAxisPosition\n\t\t\t);\n\t\t\tlet dataset;\n\t\t\tif (datum !== null) {\n\t\t\t\tdataset = datum[groupMapsTo];\n\t\t\t} else if (groups && groups.length > 0) {\n\t\t\t\tdataset = groups[0];\n\t\t\t}\n\t\t\tif (\n\t\t\t\taxisOptions?.correspondingDatasets &&\n\t\t\t\taxisOptions.correspondingDatasets.includes(dataset)\n\t\t\t) {\n\t\t\t\treturn this.secondaryRangeAxisPosition;\n\t\t\t}\n\t\t}\n\t\treturn this.rangeAxisPosition;\n\t}\n\n\tgetAxisOptions(position: AxisPositions) {\n\t\treturn Tools.getProperty(this.model.getOptions(), 'axes', position);\n\t}\n\n\tgetDomainAxisOptions() {\n\t\tconst domainAxisPosition = this.getDomainAxisPosition();\n\t\treturn this.getAxisOptions(domainAxisPosition);\n\t}\n\n\tgetRangeAxisOptions() {\n\t\tconst rangeAxisPosition = this.getRangeAxisPosition();\n\t\treturn this.getAxisOptions(rangeAxisPosition);\n\t}\n\n\tgetScaleLabel(position: AxisPositions) {\n\t\tconst axisOptions = this.getAxisOptions(position);\n\t\tlet title = axisOptions.title;\n\t\tif (!title) {\n\t\t\tif (\n\t\t\t\tposition === AxisPositions.BOTTOM ||\n\t\t\t\tposition === AxisPositions.TOP\n\t\t\t) {\n\t\t\t\treturn 'x-value';\n\t\t\t}\n\t\t\treturn 'y-value';\n\t\t}\n\t\treturn title;\n\t}\n\n\tgetDomainLabel() {\n\t\treturn this.getScaleLabel(this.getDomainAxisPosition());\n\t}\n\n\tgetRangeLabel() {\n\t\treturn this.getScaleLabel(this.getRangeAxisPosition());\n\t}\n\n\tupdate(animate = true) {\n\t\tthis.determineAxisDuality();\n\t\tthis.findDomainAndRangeAxes();\n\t\tthis.determineOrientation();\n\t\tconst axisPositions = Object.keys(AxisPositions).map(\n\t\t\t(axisPositionKey) => AxisPositions[axisPositionKey]\n\t\t);\n\t\taxisPositions.forEach((axisPosition) => {\n\t\t\tthis.scales[axisPosition] = this.createScale(axisPosition);\n\t\t});\n\t}\n\n\tfindDomainAndRangeAxes() {\n\t\t// find main axes between (left & right) && (bottom & top)\n\t\tconst verticalAxesPositions = this.findVerticalAxesPositions();\n\t\tconst horizontalAxesPositions = this.findHorizontalAxesPositions();\n\n\t\t// Now we have horizontal & vertical main axes to choose domain & range axes from\n\t\tconst domainAndRangeAxesPositions = this.findDomainAndRangeAxesPositions(\n\t\t\tverticalAxesPositions,\n\t\t\thorizontalAxesPositions\n\t\t);\n\n\t\tthis.domainAxisPosition =\n\t\t\tdomainAndRangeAxesPositions.primaryDomainAxisPosition;\n\t\tthis.rangeAxisPosition =\n\t\t\tdomainAndRangeAxesPositions.primaryRangeAxisPosition;\n\n\t\tif (this.isDualAxes()) {\n\t\t\tthis.secondaryDomainAxisPosition =\n\t\t\t\tdomainAndRangeAxesPositions.secondaryDomainAxisPosition;\n\t\t\tthis.secondaryRangeAxisPosition =\n\t\t\t\tdomainAndRangeAxesPositions.secondaryRangeAxisPosition;\n\t\t}\n\t}\n\n\tdetermineOrientation() {\n\t\tif (\n\t\t\t(this.rangeAxisPosition === AxisPositions.LEFT ||\n\t\t\t\tthis.rangeAxisPosition === AxisPositions.RIGHT) &&\n\t\t\t(this.domainAxisPosition === AxisPositions.BOTTOM ||\n\t\t\t\tthis.domainAxisPosition === AxisPositions.TOP)\n\t\t) {\n\t\t\tthis.orientation = CartesianOrientations.VERTICAL;\n\t\t} else {\n\t\t\tthis.orientation = CartesianOrientations.HORIZONTAL;\n\t\t}\n\t}\n\n\tisDualAxes() {\n\t\treturn this.dualAxes;\n\t}\n\n\t// if any of the axes objects have correspondingDatasets [] asserted we flag the chart as dual axes\n\t// it does not count as dual axes if it just has another axis turned on but is not actually using it to map a dataset\n\tdetermineAxisDuality() {\n\t\tconst options = this.model.getOptions();\n\t\tconst axesOptions = Tools.getProperty(options, 'axes');\n\n\t\tif (\n\t\t\t(axesOptions[AxisPositions.LEFT]?.correspondingDatasets &&\n\t\t\t\taxesOptions[AxisPositions.RIGHT]) ||\n\t\t\t(axesOptions[AxisPositions.RIGHT]?.correspondingDatasets &&\n\t\t\t\taxesOptions[AxisPositions.LEFT]) ||\n\t\t\t(axesOptions[AxisPositions.TOP]?.correspondingDatasets &&\n\t\t\t\taxesOptions[AxisPositions.BOTTOM]) ||\n\t\t\t(axesOptions[AxisPositions.BOTTOM]?.correspondingDatasets &&\n\t\t\t\taxesOptions[AxisPositions.TOP])\n\t\t) {\n\t\t\tthis.dualAxes = true;\n\t\t}\n\t}\n\n\tgetCustomDomainValuesByposition(axisPosition: AxisPositions) {\n\t\tconst domain = Tools.getProperty(\n\t\t\tthis.model.getOptions(),\n\t\t\t'axes',\n\t\t\taxisPosition,\n\t\t\t'domain'\n\t\t);\n\n\t\t// Check if domain is an array\n\t\tif (domain && !Array.isArray(domain)) {\n\t\t\tthrow new Error(\n\t\t\t\t`Domain in ${axisPosition} axis is not a valid array`\n\t\t\t);\n\t\t}\n\n\t\t// Determine number of elements passed in domain depending on scale types\n\t\tif (Array.isArray(domain)) {\n\t\t\tif (\n\t\t\t\t(this.scaleTypes[axisPosition] === ScaleTypes.LINEAR ||\n\t\t\t\t\tthis.scaleTypes[axisPosition] === ScaleTypes.TIME) &&\n\t\t\t\tdomain.length !== 2\n\t\t\t) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`There can only be 2 elements in domain for scale type: ${this.scaleTypes[axisPosition]}`\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\treturn domain;\n\t}\n\n\tgetOrientation() {\n\t\treturn this.orientation;\n\t}\n\n\tgetScaleByPosition(axisPosition: AxisPositions) {\n\t\treturn this.scales[axisPosition];\n\t}\n\n\tgetScaleTypeByPosition(axisPosition: AxisPositions) {\n\t\treturn this.scaleTypes[axisPosition];\n\t}\n\n\tgetDomainAxisScaleType() {\n\t\tconst domainAxisPosition = this.getDomainAxisPosition();\n\t\treturn this.getScaleTypeByPosition(domainAxisPosition);\n\t}\n\n\tgetRangeAxisScaleType() {\n\t\tconst rangeAxisPosition = this.getRangeAxisPosition();\n\t\treturn this.getScaleTypeByPosition(rangeAxisPosition);\n\t}\n\n\tgetDomainScale() {\n\t\treturn this.scales[this.domainAxisPosition];\n\t}\n\n\tgetRangeScale() {\n\t\treturn this.scales[this.rangeAxisPosition];\n\t}\n\n\t// Find the main x-axis out of the 2 x-axis on the chart (when 2D axis is used)\n\tgetMainXAxisPosition() {\n\t\tconst possibleXAxisPositions = [\n\t\t\tAxisPositions.BOTTOM,\n\t\t\tAxisPositions.TOP,\n\t\t];\n\n\t\treturn [this.domainAxisPosition, this.rangeAxisPosition].find(\n\t\t\t(position) => possibleXAxisPositions.indexOf(position) > -1\n\t\t);\n\t}\n\n\t// Find the main y-axis out of the 2 y-axis on the chart (when 2D axis is used)\n\tgetMainYAxisPosition() {\n\t\tconst possibleYAxisPositions = [\n\t\t\tAxisPositions.LEFT,\n\t\t\tAxisPositions.RIGHT,\n\t\t];\n\n\t\treturn [this.domainAxisPosition, this.rangeAxisPosition].find(\n\t\t\t(position) => possibleYAxisPositions.indexOf(position) > -1\n\t\t);\n\t}\n\n\tgetMainXScale() {\n\t\treturn this.scales[this.getMainXAxisPosition()];\n\t}\n\n\tgetMainYScale() {\n\t\treturn this.scales[this.getMainYAxisPosition()];\n\t}\n\n\tgetValueFromScale(\n\t\tscale: any,\n\t\tscaleType: ScaleTypes,\n\t\taxisPosition: AxisPositions,\n\t\tdatum: any,\n\t\tindex?: number\n\t) {\n\t\tconst options = this.model.getOptions();\n\t\tconst axesOptions = Tools.getProperty(options, 'axes');\n\t\tconst axisOptions = axesOptions[axisPosition];\n\t\tconst { mapsTo } = axisOptions;\n\t\tconst value =\n\t\t\tTools.getProperty(datum, mapsTo) !== null ? datum[mapsTo] : datum;\n\t\tlet scaledValue;\n\t\tswitch (scaleType) {\n\t\t\tcase ScaleTypes.LABELS:\n\t\t\t\tscaledValue = scale(value) + scale.step() / 2;\n\t\t\t\tbreak;\n\t\t\tcase ScaleTypes.TIME:\n\t\t\t\tscaledValue = scale(new Date(value));\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tscaledValue = scale(value);\n\t\t}\n\t\treturn scaledValue;\n\t}\n\n\tgetBoundedScaledValues(datum: any, index?: number) {\n\t\tconst { bounds } = this.model.getOptions();\n\t\tconst scale = this.scales[this.rangeAxisPosition];\n\n\t\tconst options = this.model.getOptions();\n\t\tconst axesOptions = Tools.getProperty(options, 'axes');\n\t\tconst axisOptions = axesOptions[this.rangeAxisPosition];\n\t\tconst { mapsTo } = axisOptions;\n\t\tconst value = datum[mapsTo] !== undefined ? datum[mapsTo] : datum;\n\n\t\tconst boundedValues = [\n\t\t\tscale(\n\t\t\t\tTools.getProperty(datum, bounds.upperBoundMapsTo) !== null\n\t\t\t\t\t? datum[bounds.upperBoundMapsTo]\n\t\t\t\t\t: value\n\t\t\t),\n\t\t\tscale(\n\t\t\t\tTools.getProperty(datum, bounds.lowerBoundMapsTo) !== null\n\t\t\t\t\t? datum[bounds.lowerBoundMapsTo]\n\t\t\t\t\t: value\n\t\t\t),\n\t\t];\n\n\t\treturn boundedValues;\n\t}\n\n\tgetValueThroughAxisPosition(\n\t\taxisPosition: AxisPositions,\n\t\tdatum: any,\n\t\tindex?: number\n\t) {\n\t\tconst scaleType = this.scaleTypes[axisPosition];\n\t\tconst scale = this.scales[axisPosition];\n\n\t\treturn this.getValueFromScale(\n\t\t\tscale,\n\t\t\tscaleType,\n\t\t\taxisPosition,\n\t\t\tdatum,\n\t\t\tindex\n\t\t);\n\t}\n\n\tgetDomainValue(d, i) {\n\t\tconst axisPosition = this.getDomainAxisPosition({ datum: d });\n\t\treturn this.getValueThroughAxisPosition(axisPosition, d, i);\n\t}\n\n\tgetRangeValue(d, i) {\n\t\tconst axisPosition = this.getRangeAxisPosition({ datum: d });\n\t\treturn this.getValueThroughAxisPosition(axisPosition, d, i);\n\t}\n\n\tgetMainXScaleType() {\n\t\treturn this.getScaleTypeByPosition(this.getMainXAxisPosition());\n\t}\n\n\tgetMainYScaleType() {\n\t\treturn this.getScaleTypeByPosition(this.getMainYAxisPosition());\n\t}\n\n\tgetDomainIdentifier(datum?: any) {\n\t\tconst options = this.model.getOptions();\n\t\treturn Tools.getProperty(\n\t\t\toptions,\n\t\t\t'axes',\n\t\t\tthis.getDomainAxisPosition({ datum: datum }),\n\t\t\t'mapsTo'\n\t\t);\n\t}\n\n\tgetRangeIdentifier(datum?: any) {\n\t\tconst options = this.model.getOptions();\n\t\treturn Tools.getProperty(\n\t\t\toptions,\n\t\t\t'axes',\n\t\t\tthis.getRangeAxisPosition({ datum: datum }),\n\t\t\t'mapsTo'\n\t\t);\n\t}\n\n\textendsDomain(axisPosition: AxisPositions, domain: any) {\n\t\tconst options = this.model.getOptions();\n\t\tconst axisOptions = Tools.getProperty(options, 'axes', axisPosition);\n\t\tif (axisOptions.scaleType === ScaleTypes.TIME) {\n\t\t\tconst spaceToAddToEdges = Tools.getProperty(\n\t\t\t\toptions,\n\t\t\t\t'timeScale',\n\t\t\t\t'addSpaceOnEdges'\n\t\t\t);\n\t\t\treturn addSpacingToTimeDomain(domain, spaceToAddToEdges);\n\t\t} else {\n\t\t\treturn addSpacingToContinuousDomain(\n\t\t\t\tdomain,\n\t\t\t\tConfiguration.axis.paddingRatio,\n\t\t\t\taxisOptions.scaleType\n\t\t\t);\n\t\t}\n\t}\n\n\tprotected findVerticalAxesPositions() {\n\t\tconst options = this.model.getOptions();\n\t\tconst axesOptions = Tools.getProperty(options, 'axes');\n\t\tconst dualAxes = this.isDualAxes();\n\n\t\t// If right axis has been specified as `main`\n\t\tif (\n\t\t\t(Tools.getProperty(axesOptions, AxisPositions.LEFT) === null &&\n\t\t\t\tTools.getProperty(axesOptions, AxisPositions.RIGHT) !== null) ||\n\t\t\tTools.getProperty(axesOptions, AxisPositions.RIGHT, 'main') ===\n\t\t\t\ttrue ||\n\t\t\t(dualAxes &&\n\t\t\t\tTools.getProperty(\n\t\t\t\t\taxesOptions,\n\t\t\t\t\tAxisPositions.LEFT,\n\t\t\t\t\t'correspondingDatasets'\n\t\t\t\t))\n\t\t) {\n\t\t\treturn {\n\t\t\t\tprimary: AxisPositions.RIGHT,\n\t\t\t\tsecondary: AxisPositions.LEFT,\n\t\t\t};\n\t\t}\n\n\t\treturn { primary: AxisPositions.LEFT, secondary: AxisPositions.RIGHT };\n\t}\n\n\tprotected findHorizontalAxesPositions() {\n\t\tconst options = this.model.getOptions();\n\t\tconst axesOptions = Tools.getProperty(options, 'axes');\n\t\tconst dualAxes = this.isDualAxes();\n\n\t\t// If top axis has been specified as `main`\n\t\tif (\n\t\t\t(Tools.getProperty(axesOptions, AxisPositions.BOTTOM) === null &&\n\t\t\t\tTools.getProperty(axesOptions, AxisPositions.TOP) !== null) ||\n\t\t\tTools.getProperty(axesOptions, AxisPositions.TOP, 'main') ===\n\t\t\t\ttrue ||\n\t\t\t(dualAxes &&\n\t\t\t\tTools.getProperty(\n\t\t\t\t\taxesOptions,\n\t\t\t\t\tAxisPositions.BOTTOM,\n\t\t\t\t\t'correspondingDatasets'\n\t\t\t\t))\n\t\t) {\n\t\t\treturn {\n\t\t\t\tprimary: AxisPositions.TOP,\n\t\t\t\tsecondary: AxisPositions.BOTTOM,\n\t\t\t};\n\t\t}\n\n\t\treturn { primary: AxisPositions.BOTTOM, secondary: AxisPositions.TOP };\n\t}\n\n\tprotected findDomainAndRangeAxesPositions(\n\t\tverticalAxesPositions,\n\t\thorizontalAxesPositions\n\t) {\n\t\tconst options = this.model.getOptions();\n\n\t\tconst mainVerticalAxisOptions = Tools.getProperty(\n\t\t\toptions,\n\t\t\t'axes',\n\t\t\tverticalAxesPositions.primary\n\t\t);\n\t\tconst mainHorizontalAxisOptions = Tools.getProperty(\n\t\t\toptions,\n\t\t\t'axes',\n\t\t\thorizontalAxesPositions.primary\n\t\t);\n\n\t\tconst mainVerticalScaleType =\n\t\t\tmainVerticalAxisOptions.scaleType || ScaleTypes.LINEAR;\n\t\tconst mainHorizontalScaleType =\n\t\t\tmainHorizontalAxisOptions.scaleType || ScaleTypes.LINEAR;\n\n\t\tconst result = {\n\t\t\tprimaryDomainAxisPosition: null,\n\t\t\tsecondaryDomainAxisPosition: null,\n\t\t\tprimaryRangeAxisPosition: null,\n\t\t\tsecondaryRangeAxisPosition: null,\n\t\t};\n\n\t\t// assign to to be a vertical chart by default\n\t\tresult.primaryDomainAxisPosition = horizontalAxesPositions.primary;\n\t\tresult.primaryRangeAxisPosition = verticalAxesPositions.primary;\n\t\t// secondary axes\n\t\tresult.secondaryDomainAxisPosition = horizontalAxesPositions.secondary;\n\t\tresult.secondaryRangeAxisPosition = verticalAxesPositions.secondary;\n\n\t\t// if neither the horizontal axes are label or time\n\t\t// and atleast one of the main vertical ones are labels or time then it should be horizontal\n\t\tif (\n\t\t\t(!(\n\t\t\t\tmainHorizontalScaleType === ScaleTypes.LABELS ||\n\t\t\t\tmainHorizontalScaleType === ScaleTypes.TIME\n\t\t\t) &&\n\t\t\t\tmainVerticalScaleType === ScaleTypes.LABELS) ||\n\t\t\tmainVerticalScaleType === ScaleTypes.TIME\n\t\t) {\n\t\t\tresult.primaryDomainAxisPosition = verticalAxesPositions.primary;\n\t\t\tresult.primaryRangeAxisPosition = horizontalAxesPositions.primary;\n\t\t\t// secondary axes\n\t\t\tresult.secondaryDomainAxisPosition =\n\t\t\t\tverticalAxesPositions.secondary;\n\t\t\tresult.secondaryRangeAxisPosition =\n\t\t\t\thorizontalAxesPositions.secondary;\n\t\t}\n\n\t\treturn result;\n\t}\n\n\tprotected getScaleDomain(axisPosition: AxisPositions) {\n\t\tconst options = this.model.getOptions();\n\t\tconst axisOptions = Tools.getProperty(options, 'axes', axisPosition);\n\t\tconst bounds = Tools.getProperty(options, 'bounds');\n\t\tconst { includeZero } = axisOptions;\n\t\tconst scaleType =\n\t\t\tTools.getProperty(axisOptions, 'scaleType') || ScaleTypes.LINEAR;\n\n\t\tif (this.model.isDataEmpty()) {\n\t\t\treturn [];\n\t\t}\n\n\t\tif (axisOptions.binned) {\n\t\t\tconst { bins } = this.model.getBinConfigurations();\n\n\t\t\treturn [0, max(bins, (d) => d.length)];\n\t\t} else if (axisOptions.limitDomainToBins) {\n\t\t\tconst { bins } = this.model.getBinConfigurations();\n\t\t\tconst stackKeys = this.model.getStackKeys({ bins });\n\n\t\t\treturn [\n\t\t\t\tstackKeys[0].split('-')[0],\n\t\t\t\tstackKeys[stackKeys.length - 1].split('-')[1],\n\t\t\t];\n\t\t}\n\n\t\tconst displayData = this.model.getDisplayData();\n\t\tconst {\n\t\t\textendLinearDomainBy,\n\t\t\tmapsTo,\n\t\t\tpercentage,\n\t\t\tthresholds,\n\t\t} = axisOptions;\n\t\tconst {\n\t\t\treference: ratioReference,\n\t\t\tcompareTo: ratioCompareTo,\n\t\t} = Configuration.axis.ratio;\n\n\t\t// If domain is specified return that domain\n\t\tif (axisOptions.domain) {\n\t\t\tif (scaleType === ScaleTypes.LABELS) {\n\t\t\t\treturn axisOptions.domain;\n\t\t\t} else if (scaleType === ScaleTypes.TIME) {\n\t\t\t\taxisOptions.domain = axisOptions.domain.map((d) =>\n\t\t\t\t\td.getTime === undefined ? new Date(d) : d\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn this.extendsDomain(axisPosition, axisOptions.domain);\n\t\t}\n\n\t\t// Return [0, 100] for percentage axis scale\n\t\tif (percentage) {\n\t\t\treturn [0, 100];\n\t\t}\n\n\t\t// If scale is a LABELS scale, return some labels as the domain\n\t\tif (axisOptions && scaleType === ScaleTypes.LABELS) {\n\t\t\t// Get unique values\n\t\t\treturn Tools.removeArrayDuplicates(\n\t\t\t\tdisplayData.map((d) => d[mapsTo])\n\t\t\t);\n\t\t}\n\n\t\t// Get the extent of the domain\n\t\tlet domain;\n\t\tlet allDataValues;\n\t\tconst dataGroupNames = this.model.getDataGroupNames();\n\n\t\tif (scaleType === ScaleTypes.LABELS_RATIO) {\n\t\t\treturn displayData.map(\n\t\t\t\t(datum) => `${datum[ratioReference]}/${datum[ratioCompareTo]}`\n\t\t\t);\n\t\t} else if (scaleType === ScaleTypes.TIME) {\n\t\t\tallDataValues = displayData.map(\n\t\t\t\t(datum) => +new Date(datum[mapsTo])\n\t\t\t);\n\t\t} else if (bounds && options.axes) {\n\t\t\tallDataValues = [];\n\n\t\t\tdisplayData.forEach((datum) => {\n\t\t\t\tallDataValues.push(datum[mapsTo]);\n\n\t\t\t\tif (datum[bounds.upperBoundMapsTo]) {\n\t\t\t\t\tallDataValues.push(datum[bounds.upperBoundMapsTo]);\n\t\t\t\t}\n\t\t\t\tif (datum[bounds.lowerBoundMapsTo]) {\n\t\t\t\t\tallDataValues.push(datum[bounds.lowerBoundMapsTo]);\n\t\t\t\t}\n\t\t\t});\n\t\t} else if (\n\t\t\taxisOptions.stacked === true &&\n\t\t\tdataGroupNames &&\n\t\t\taxisPosition === this.getRangeAxisPosition()\n\t\t) {\n\t\t\tconst { groupMapsTo } = options.data;\n\t\t\tconst dataValuesGroupedByKeys = this.model.getDataValuesGroupedByKeys(\n\t\t\t\t{\n\t\t\t\t\tgroups: dataGroupNames,\n\t\t\t\t}\n\t\t\t);\n\t\t\tconst nonStackedGroupsData = displayData.filter(\n\t\t\t\t(datum) => !dataGroupNames.includes(datum[groupMapsTo])\n\t\t\t);\n\n\t\t\tlet stackedValues = [];\n\t\t\tdataValuesGroupedByKeys.forEach((dataValues) => {\n\t\t\t\tconst { sharedStackKey, ...numericalValues } = dataValues;\n\n\t\t\t\tlet positiveSum = 0,\n\t\t\t\t\tnegativeSum = 0;\n\t\t\t\tObject.values(numericalValues).forEach((value: number) => {\n\t\t\t\t\tif (!isNaN(value)) {\n\t\t\t\t\t\tif (value < 0) {\n\t\t\t\t\t\t\tnegativeSum += value;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tpositiveSum += value;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tstackedValues.push([negativeSum, positiveSum]);\n\t\t\t});\n\n\t\t\tallDataValues = [\n\t\t\t\t...Tools.flatten(stackedValues),\n\t\t\t\t...nonStackedGroupsData.map((datum) => datum[mapsTo]),\n\t\t\t];\n\t\t} else {\n\t\t\tallDataValues = [];\n\n\t\t\tdisplayData.forEach((datum) => {\n\t\t\t\tconst value = datum[mapsTo];\n\t\t\t\tif (Array.isArray(value) && value.length === 2) {\n\t\t\t\t\tallDataValues.push(value[0]);\n\t\t\t\t\tallDataValues.push(value[1]);\n\t\t\t\t} else {\n\t\t\t\t\tif (extendLinearDomainBy) {\n\t\t\t\t\t\tallDataValues.push(\n\t\t\t\t\t\t\tMath.max(datum[mapsTo], datum[extendLinearDomainBy])\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tallDataValues.push(value);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\t// Time can never be 0 and log of base 0 is -Infinity\n\t\tif (\n\t\t\tscaleType !== ScaleTypes.TIME &&\n\t\t\tscaleType !== ScaleTypes.LOG &&\n\t\t\tincludeZero\n\t\t) {\n\t\t\tallDataValues.push(0);\n\t\t}\n\n\t\t// Add threshold values into the scale\n\t\tif (thresholds && thresholds.length > 0) {\n\t\t\tthresholds.forEach((threshold) => {\n\t\t\t\tconst thresholdValue = Tools.getProperty(threshold, 'value');\n\t\t\t\tif (thresholdValue !== null) allDataValues.push(thresholdValue);\n\t\t\t});\n\t\t}\n\n\t\tdomain = extent(allDataValues);\n\t\tdomain = this.extendsDomain(axisPosition, domain);\n\n\t\treturn domain;\n\t}\n\n\tprotected createScale(axisPosition: AxisPositions) {\n\t\tconst options = this.model.getOptions();\n\t\tconst axisOptions = Tools.getProperty(options, 'axes', axisPosition);\n\n\t\tif (!axisOptions) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst scaleType =\n\t\t\tTools.getProperty(axisOptions, 'scaleType') || ScaleTypes.LINEAR;\n\t\tthis.scaleTypes[axisPosition] = scaleType;\n\n\t\tlet scale;\n\t\tif (scaleType === ScaleTypes.TIME) {\n\t\t\tscale = scaleTime();\n\t\t} else if (scaleType === ScaleTypes.LOG) {\n\t\t\tscale = scaleLog().base(axisOptions.base || 10);\n\t\t} else if (\n\t\t\tscaleType === ScaleTypes.LABELS ||\n\t\t\tscaleType === ScaleTypes.LABELS_RATIO\n\t\t) {\n\t\t\tscale = scaleBand();\n\t\t} else {\n\t\t\tscale = scaleLinear();\n\t\t}\n\n\t\tscale.domain(this.getScaleDomain(axisPosition));\n\n\t\treturn scale;\n\t}\n\n\tprotected getHighestDomainThreshold(): null | {\n\t\tthreshold: ThresholdOptions;\n\t\tscaleValue: number;\n\t} {\n\t\tconst axesOptions = Tools.getProperty(this.model.getOptions(), 'axes');\n\t\tconst domainAxisPosition = this.getDomainAxisPosition();\n\n\t\tconst { thresholds } = axesOptions[domainAxisPosition];\n\n\t\t// Check if thresholds exist & is not empty\n\t\tif (\n\t\t\t!Array.isArray(thresholds) ||\n\t\t\t(Array.isArray(thresholds) && !thresholds.length)\n\t\t) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst domainScale = this.getDomainScale();\n\t\t// Find the highest threshold for the domain\n\t\tconst highestThreshold = thresholds.sort(\n\t\t\t(a, b) => b.value - a.value\n\t\t)[0];\n\n\t\tconst scaleType = this.getScaleTypeByPosition(domainAxisPosition);\n\t\tif (\n\t\t\tscaleType === ScaleTypes.TIME &&\n\t\t\t(typeof highestThreshold.value === 'string' ||\n\t\t\t\thighestThreshold.value.getTime === undefined)\n\t\t) {\n\t\t\thighestThreshold.value = new Date(highestThreshold.value);\n\t\t}\n\n\t\treturn {\n\t\t\tthreshold: highestThreshold,\n\t\t\tscaleValue: domainScale(highestThreshold.value),\n\t\t};\n\t}\n\n\tprotected getHighestRangeThreshold(): null | {\n\t\tthreshold: ThresholdOptions;\n\t\tscaleValue: number;\n\t} {\n\t\tconst axesOptions = Tools.getProperty(this.model.getOptions(), 'axes');\n\t\tconst rangeAxisPosition = this.getRangeAxisPosition();\n\n\t\tconst { thresholds } = axesOptions[rangeAxisPosition];\n\n\t\t// Check if thresholds exist & is not empty\n\t\tif (\n\t\t\t!Array.isArray(thresholds) ||\n\t\t\t(Array.isArray(thresholds) && !thresholds.length)\n\t\t) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst rangeScale = this.getRangeScale();\n\t\t// Find the highest threshold for the range\n\t\tconst highestThreshold = thresholds.sort(\n\t\t\t(a, b) => b.value - a.value\n\t\t)[0];\n\n\t\treturn {\n\t\t\tthreshold: highestThreshold,\n\t\t\tscaleValue: rangeScale(highestThreshold.value),\n\t\t};\n\t}\n}\n\nfunction addSpacingToTimeDomain(domain: any, spaceToAddToEdges: number) {\n\tconst startDate = new Date(domain[0]);\n\tconst endDate = new Date(domain[1]);\n\n\tif (differenceInYears(endDate, startDate) > 1) {\n\t\treturn [\n\t\t\tsubYears(startDate, spaceToAddToEdges),\n\t\t\taddYears(endDate, spaceToAddToEdges),\n\t\t];\n\t}\n\n\tif (differenceInMonths(endDate, startDate) > 1) {\n\t\treturn [\n\t\t\tsubMonths(startDate, spaceToAddToEdges),\n\t\t\taddMonths(endDate, spaceToAddToEdges),\n\t\t];\n\t}\n\n\tif (differenceInDays(endDate, startDate) > 1) {\n\t\treturn [\n\t\t\tsubDays(startDate, spaceToAddToEdges),\n\t\t\taddDays(endDate, spaceToAddToEdges),\n\t\t];\n\t}\n\n\tif (differenceInHours(endDate, startDate) > 1) {\n\t\treturn [\n\t\t\tsubHours(startDate, spaceToAddToEdges),\n\t\t\taddHours(endDate, spaceToAddToEdges),\n\t\t];\n\t}\n\n\tif (differenceInMinutes(endDate, startDate) > 30) {\n\t\treturn [\n\t\t\tsubMinutes(startDate, spaceToAddToEdges * 30),\n\t\t\taddMinutes(endDate, spaceToAddToEdges * 30),\n\t\t];\n\t}\n\n\tif (differenceInMinutes(endDate, startDate) > 1) {\n\t\treturn [\n\t\t\tsubMinutes(startDate, spaceToAddToEdges),\n\t\t\taddMinutes(endDate, spaceToAddToEdges),\n\t\t];\n\t}\n\n\tif (differenceInSeconds(endDate, startDate) > 15) {\n\t\treturn [\n\t\t\tsubSeconds(startDate, spaceToAddToEdges * 15),\n\t\t\taddSeconds(endDate, spaceToAddToEdges * 15),\n\t\t];\n\t}\n\n\tif (differenceInSeconds(endDate, startDate) > 1) {\n\t\treturn [\n\t\t\tsubSeconds(startDate, spaceToAddToEdges),\n\t\t\taddSeconds(endDate, spaceToAddToEdges),\n\t\t];\n\t}\n\n\treturn [startDate, endDate];\n}\n\nfunction addSpacingToContinuousDomain(\n\t[lower, upper]: number[],\n\tpaddingRatio: number,\n\tscaleType?: ScaleTypes\n) {\n\tconst domainLength = upper - lower;\n\tconst padding = domainLength * paddingRatio;\n\n\t// If padding crosses 0, keep 0 as new upper bound\n\tconst newUpper = upper <= 0 && upper + padding > 0 ? 0 : upper + padding;\n\t// If padding crosses 0, keep 0 as new lower bound\n\tlet newLower = lower >= 0 && lower - padding < 0 ? 0 : lower - padding;\n\n\t// Log of base 0 or a negative number is -Infinity\n\tif (scaleType === ScaleTypes.LOG && newLower <= 0) {\n\t\tif (lower <= 0) {\n\t\t\tthrow Error(\n\t\t\t\t'Data must have values greater than 0 if log scale type is used.'\n\t\t\t);\n\t\t}\n\t\tnewLower = lower;\n\t}\n\n\treturn [newLower, newUpper];\n}\n"]}
|
|
1
|
+
{"version":3,"file":"scales-cartesian.js","sourceRoot":"","sources":["scales-cartesian.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mBAAmB;AACnB,OAAO,KAAK,aAAa,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAA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OAAO,EAAE,iBAAiB,GAAG,EAAE,CAAC;SAC3C,CAAC;KACF;IAED,IAAI,mBAAmB,CAAC,OAAO,EAAE,SAAS,CAAC,GAAG,CAAC,EAAE;QAChD,OAAO;YACN,UAAU,CAAC,SAAS,EAAE,iBAAiB,CAAC;YACxC,UAAU,CAAC,OAAO,EAAE,iBAAiB,CAAC;SACtC,CAAC;KACF;IAED,OAAO,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;AAC7B,CAAC;AAED,SAAS,4BAA4B,CACpC,EAAwB,EACxB,YAAoB,EACpB,SAAsB;QAFrB,aAAK,EAAE,aAAK;IAIb,IAAM,YAAY,GAAG,KAAK,GAAG,KAAK,CAAC;IACnC,IAAM,OAAO,GAAG,YAAY,GAAG,YAAY,CAAC;IAE5C,kDAAkD;IAClD,IAAM,QAAQ,GAAG,KAAK,IAAI,CAAC,IAAI,KAAK,GAAG,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,OAAO,CAAC;IACzE,kDAAkD;IAClD,IAAI,QAAQ,GAAG,KAAK,IAAI,CAAC,IAAI,KAAK,GAAG,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,OAAO,CAAC;IAEvE,kDAAkD;IAClD,IAAI,SAAS,KAAK,UAAU,CAAC,GAAG,IAAI,QAAQ,IAAI,CAAC,EAAE;QAClD,IAAI,KAAK,IAAI,CAAC,EAAE;YACf,MAAM,KAAK,CACV,iEAAiE,CACjE,CAAC;SACF;QACD,QAAQ,GAAG,KAAK,CAAC;KACjB;IAED,OAAO,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;AAC7B,CAAC","sourcesContent":["// Internal Imports\nimport * as Configuration from '../configuration';\nimport { Service } from './service';\nimport {\n\tAxisPositions,\n\tCartesianOrientations,\n\tScaleTypes,\n\tThresholdOptions,\n} from '../interfaces';\nimport { Tools } from '../tools';\n\n// D3 Imports\nimport { scaleBand, scaleLinear, scaleTime, scaleLog } from 'd3-scale';\nimport { extent, max } from 'd3-array';\n\n// Misc\nimport {\n\tdifferenceInYears,\n\taddYears,\n\tsubYears,\n\tdifferenceInMonths,\n\taddMonths,\n\tsubMonths,\n\tdifferenceInDays,\n\taddDays,\n\tsubDays,\n\tdifferenceInHours,\n\taddHours,\n\tsubHours,\n\tdifferenceInMinutes,\n\taddMinutes,\n\tsubMinutes,\n\tdifferenceInSeconds,\n\tsubSeconds,\n\taddSeconds,\n} from 'date-fns';\n\nexport class CartesianScales extends Service {\n\tprotected scaleTypes = {\n\t\ttop: null,\n\t\tright: null,\n\t\tbottom: null,\n\t\tleft: null,\n\t};\n\n\tprotected scales = {\n\t\ttop: null,\n\t\tright: null,\n\t\tbottom: null,\n\t\tleft: null,\n\t};\n\n\tprotected domainAxisPosition: AxisPositions;\n\tprotected rangeAxisPosition: AxisPositions;\n\tprotected secondaryDomainAxisPosition: AxisPositions;\n\tprotected secondaryRangeAxisPosition: AxisPositions;\n\n\tprotected dualAxes: Boolean;\n\n\tprotected orientation: CartesianOrientations;\n\n\tgetDomainAxisPosition({ datum = null } = {}) {\n\t\tif (this.dualAxes && datum) {\n\t\t\tconst options = this.model.getOptions();\n\t\t\tconst { groupMapsTo } = options.data;\n\t\t\tconst axesOptions = Tools.getProperty(\n\t\t\t\toptions,\n\t\t\t\t'axes',\n\t\t\t\tthis.secondaryDomainAxisPosition\n\t\t\t);\n\t\t\tconst dataset = datum[groupMapsTo];\n\t\t\tif (\n\t\t\t\taxesOptions?.correspondingDatasets &&\n\t\t\t\taxesOptions.correspondingDatasets.includes(dataset)\n\t\t\t) {\n\t\t\t\treturn this.secondaryDomainAxisPosition;\n\t\t\t}\n\t\t}\n\t\treturn this.domainAxisPosition;\n\t}\n\n\tgetRangeAxisPosition({ datum = null, groups = null } = {}) {\n\t\tif (this.dualAxes) {\n\t\t\tconst options = this.model.getOptions();\n\t\t\tconst { groupMapsTo } = options.data;\n\t\t\tconst axisOptions = Tools.getProperty(\n\t\t\t\toptions,\n\t\t\t\t'axes',\n\t\t\t\tthis.secondaryRangeAxisPosition\n\t\t\t);\n\t\t\tlet dataset;\n\t\t\tif (datum !== null) {\n\t\t\t\tdataset = datum[groupMapsTo];\n\t\t\t} else if (groups && groups.length > 0) {\n\t\t\t\tdataset = groups[0];\n\t\t\t}\n\t\t\tif (\n\t\t\t\taxisOptions?.correspondingDatasets &&\n\t\t\t\taxisOptions.correspondingDatasets.includes(dataset)\n\t\t\t) {\n\t\t\t\treturn this.secondaryRangeAxisPosition;\n\t\t\t}\n\t\t}\n\t\treturn this.rangeAxisPosition;\n\t}\n\n\tgetAxisOptions(position: AxisPositions) {\n\t\treturn Tools.getProperty(this.model.getOptions(), 'axes', position);\n\t}\n\n\tgetDomainAxisOptions() {\n\t\tconst domainAxisPosition = this.getDomainAxisPosition();\n\t\treturn this.getAxisOptions(domainAxisPosition);\n\t}\n\n\tgetRangeAxisOptions() {\n\t\tconst rangeAxisPosition = this.getRangeAxisPosition();\n\t\treturn this.getAxisOptions(rangeAxisPosition);\n\t}\n\n\tgetScaleLabel(position: AxisPositions) {\n\t\tconst axisOptions = this.getAxisOptions(position);\n\t\tlet title = axisOptions.title;\n\t\tif (!title) {\n\t\t\tif (\n\t\t\t\tposition === AxisPositions.BOTTOM ||\n\t\t\t\tposition === AxisPositions.TOP\n\t\t\t) {\n\t\t\t\treturn 'x-value';\n\t\t\t}\n\t\t\treturn 'y-value';\n\t\t}\n\t\treturn title;\n\t}\n\n\tgetDomainLabel() {\n\t\treturn this.getScaleLabel(this.getDomainAxisPosition());\n\t}\n\n\tgetRangeLabel() {\n\t\treturn this.getScaleLabel(this.getRangeAxisPosition());\n\t}\n\n\tupdate(animate = true) {\n\t\tthis.determineAxisDuality();\n\t\tthis.findDomainAndRangeAxes();\n\t\tthis.determineOrientation();\n\t\tconst axisPositions = Object.keys(AxisPositions).map(\n\t\t\t(axisPositionKey) => AxisPositions[axisPositionKey]\n\t\t);\n\t\taxisPositions.forEach((axisPosition) => {\n\t\t\tthis.scales[axisPosition] = this.createScale(axisPosition);\n\t\t});\n\t}\n\n\tfindDomainAndRangeAxes() {\n\t\t// find main axes between (left & right) && (bottom & top)\n\t\tconst verticalAxesPositions = this.findVerticalAxesPositions();\n\t\tconst horizontalAxesPositions = this.findHorizontalAxesPositions();\n\n\t\t// Now we have horizontal & vertical main axes to choose domain & range axes from\n\t\tconst domainAndRangeAxesPositions = this.findDomainAndRangeAxesPositions(\n\t\t\tverticalAxesPositions,\n\t\t\thorizontalAxesPositions\n\t\t);\n\n\t\tthis.domainAxisPosition =\n\t\t\tdomainAndRangeAxesPositions.primaryDomainAxisPosition;\n\t\tthis.rangeAxisPosition =\n\t\t\tdomainAndRangeAxesPositions.primaryRangeAxisPosition;\n\n\t\tif (this.isDualAxes()) {\n\t\t\tthis.secondaryDomainAxisPosition =\n\t\t\t\tdomainAndRangeAxesPositions.secondaryDomainAxisPosition;\n\t\t\tthis.secondaryRangeAxisPosition =\n\t\t\t\tdomainAndRangeAxesPositions.secondaryRangeAxisPosition;\n\t\t}\n\t}\n\n\tdetermineOrientation() {\n\t\tif (\n\t\t\t(this.rangeAxisPosition === AxisPositions.LEFT ||\n\t\t\t\tthis.rangeAxisPosition === AxisPositions.RIGHT) &&\n\t\t\t(this.domainAxisPosition === AxisPositions.BOTTOM ||\n\t\t\t\tthis.domainAxisPosition === AxisPositions.TOP)\n\t\t) {\n\t\t\tthis.orientation = CartesianOrientations.VERTICAL;\n\t\t} else {\n\t\t\tthis.orientation = CartesianOrientations.HORIZONTAL;\n\t\t}\n\t}\n\n\tisDualAxes() {\n\t\treturn this.dualAxes;\n\t}\n\n\t// if any of the axes objects have correspondingDatasets [] asserted we flag the chart as dual axes\n\t// it does not count as dual axes if it just has another axis turned on but is not actually using it to map a dataset\n\tdetermineAxisDuality() {\n\t\tconst options = this.model.getOptions();\n\t\tconst axesOptions = Tools.getProperty(options, 'axes');\n\n\t\tif (\n\t\t\t(axesOptions[AxisPositions.LEFT]?.correspondingDatasets &&\n\t\t\t\taxesOptions[AxisPositions.RIGHT]) ||\n\t\t\t(axesOptions[AxisPositions.RIGHT]?.correspondingDatasets &&\n\t\t\t\taxesOptions[AxisPositions.LEFT]) ||\n\t\t\t(axesOptions[AxisPositions.TOP]?.correspondingDatasets &&\n\t\t\t\taxesOptions[AxisPositions.BOTTOM]) ||\n\t\t\t(axesOptions[AxisPositions.BOTTOM]?.correspondingDatasets &&\n\t\t\t\taxesOptions[AxisPositions.TOP])\n\t\t) {\n\t\t\tthis.dualAxes = true;\n\t\t}\n\t}\n\n\tgetCustomDomainValuesByposition(axisPosition: AxisPositions) {\n\t\tconst domain = Tools.getProperty(\n\t\t\tthis.model.getOptions(),\n\t\t\t'axes',\n\t\t\taxisPosition,\n\t\t\t'domain'\n\t\t);\n\n\t\t// Check if domain is an array\n\t\tif (domain && !Array.isArray(domain)) {\n\t\t\tthrow new Error(\n\t\t\t\t`Domain in ${axisPosition} axis is not a valid array`\n\t\t\t);\n\t\t}\n\n\t\t// Determine number of elements passed in domain depending on scale types\n\t\tif (Array.isArray(domain)) {\n\t\t\tif (\n\t\t\t\t(this.scaleTypes[axisPosition] === ScaleTypes.LINEAR ||\n\t\t\t\t\tthis.scaleTypes[axisPosition] === ScaleTypes.TIME) &&\n\t\t\t\tdomain.length !== 2\n\t\t\t) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`There can only be 2 elements in domain for scale type: ${this.scaleTypes[axisPosition]}`\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\treturn domain;\n\t}\n\n\tgetOrientation() {\n\t\treturn this.orientation;\n\t}\n\n\tgetScaleByPosition(axisPosition: AxisPositions) {\n\t\treturn this.scales[axisPosition];\n\t}\n\n\tgetScaleTypeByPosition(axisPosition: AxisPositions) {\n\t\treturn this.scaleTypes[axisPosition];\n\t}\n\n\tgetDomainAxisScaleType() {\n\t\tconst domainAxisPosition = this.getDomainAxisPosition();\n\t\treturn this.getScaleTypeByPosition(domainAxisPosition);\n\t}\n\n\tgetRangeAxisScaleType() {\n\t\tconst rangeAxisPosition = this.getRangeAxisPosition();\n\t\treturn this.getScaleTypeByPosition(rangeAxisPosition);\n\t}\n\n\tgetDomainScale() {\n\t\treturn this.scales[this.domainAxisPosition];\n\t}\n\n\tgetRangeScale() {\n\t\treturn this.scales[this.rangeAxisPosition];\n\t}\n\n\t// Find the main x-axis out of the 2 x-axis on the chart (when 2D axis is used)\n\tgetMainXAxisPosition() {\n\t\tconst possibleXAxisPositions = [\n\t\t\tAxisPositions.BOTTOM,\n\t\t\tAxisPositions.TOP,\n\t\t];\n\n\t\treturn [this.domainAxisPosition, this.rangeAxisPosition].find(\n\t\t\t(position) => possibleXAxisPositions.indexOf(position) > -1\n\t\t);\n\t}\n\n\t// Find the main y-axis out of the 2 y-axis on the chart (when 2D axis is used)\n\tgetMainYAxisPosition() {\n\t\tconst possibleYAxisPositions = [\n\t\t\tAxisPositions.LEFT,\n\t\t\tAxisPositions.RIGHT,\n\t\t];\n\n\t\treturn [this.domainAxisPosition, this.rangeAxisPosition].find(\n\t\t\t(position) => possibleYAxisPositions.indexOf(position) > -1\n\t\t);\n\t}\n\n\tgetMainXScale() {\n\t\treturn this.scales[this.getMainXAxisPosition()];\n\t}\n\n\tgetMainYScale() {\n\t\treturn this.scales[this.getMainYAxisPosition()];\n\t}\n\n\tgetValueFromScale(\n\t\tscale: any,\n\t\tscaleType: ScaleTypes,\n\t\taxisPosition: AxisPositions,\n\t\tdatum: any,\n\t\tindex?: number\n\t) {\n\t\tconst options = this.model.getOptions();\n\t\tconst axesOptions = Tools.getProperty(options, 'axes');\n\t\tconst axisOptions = axesOptions[axisPosition];\n\t\tconst { mapsTo } = axisOptions;\n\t\tconst value =\n\t\t\tTools.getProperty(datum, mapsTo) !== null ? datum[mapsTo] : datum;\n\t\tlet scaledValue;\n\t\tswitch (scaleType) {\n\t\t\tcase ScaleTypes.LABELS:\n\t\t\t\tscaledValue = scale(value) + scale.step() / 2;\n\t\t\t\tbreak;\n\t\t\tcase ScaleTypes.TIME:\n\t\t\t\tscaledValue = scale(new Date(value));\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tscaledValue = scale(value);\n\t\t}\n\t\treturn scaledValue;\n\t}\n\n\tgetBoundedScaledValues(datum: any, index?: number) {\n\t\tconst { bounds } = this.model.getOptions();\n\t\tconst axisPosition = this.getRangeAxisPosition({ datum });\n\t\tconst scale = this.scales[axisPosition];\n\n\t\tconst options = this.model.getOptions();\n\t\tconst axesOptions = Tools.getProperty(options, 'axes');\n\t\tconst axisOptions = axesOptions[axisPosition];\n\t\tconst { mapsTo } = axisOptions;\n\t\tconst value = datum[mapsTo] !== undefined ? datum[mapsTo] : datum;\n\n\t\tconst boundedValues = [\n\t\t\tscale(\n\t\t\t\tTools.getProperty(datum, bounds.upperBoundMapsTo) !== null\n\t\t\t\t\t? datum[bounds.upperBoundMapsTo]\n\t\t\t\t\t: value\n\t\t\t),\n\t\t\tscale(\n\t\t\t\tTools.getProperty(datum, bounds.lowerBoundMapsTo) !== null\n\t\t\t\t\t? datum[bounds.lowerBoundMapsTo]\n\t\t\t\t\t: value\n\t\t\t),\n\t\t];\n\n\t\treturn boundedValues;\n\t}\n\n\tgetValueThroughAxisPosition(\n\t\taxisPosition: AxisPositions,\n\t\tdatum: any,\n\t\tindex?: number\n\t) {\n\t\tconst scaleType = this.scaleTypes[axisPosition];\n\t\tconst scale = this.scales[axisPosition];\n\n\t\treturn this.getValueFromScale(\n\t\t\tscale,\n\t\t\tscaleType,\n\t\t\taxisPosition,\n\t\t\tdatum,\n\t\t\tindex\n\t\t);\n\t}\n\n\tgetDomainValue(d, i) {\n\t\tconst axisPosition = this.getDomainAxisPosition({ datum: d });\n\t\treturn this.getValueThroughAxisPosition(axisPosition, d, i);\n\t}\n\n\tgetRangeValue(d, i) {\n\t\tconst axisPosition = this.getRangeAxisPosition({ datum: d });\n\t\treturn this.getValueThroughAxisPosition(axisPosition, d, i);\n\t}\n\n\tgetMainXScaleType() {\n\t\treturn this.getScaleTypeByPosition(this.getMainXAxisPosition());\n\t}\n\n\tgetMainYScaleType() {\n\t\treturn this.getScaleTypeByPosition(this.getMainYAxisPosition());\n\t}\n\n\tgetDomainIdentifier(datum?: any) {\n\t\tconst options = this.model.getOptions();\n\t\treturn Tools.getProperty(\n\t\t\toptions,\n\t\t\t'axes',\n\t\t\tthis.getDomainAxisPosition({ datum: datum }),\n\t\t\t'mapsTo'\n\t\t);\n\t}\n\n\tgetRangeIdentifier(datum?: any) {\n\t\tconst options = this.model.getOptions();\n\t\treturn Tools.getProperty(\n\t\t\toptions,\n\t\t\t'axes',\n\t\t\tthis.getRangeAxisPosition({ datum: datum }),\n\t\t\t'mapsTo'\n\t\t);\n\t}\n\n\textendsDomain(axisPosition: AxisPositions, domain: any) {\n\t\tconst options = this.model.getOptions();\n\t\tconst axisOptions = Tools.getProperty(options, 'axes', axisPosition);\n\t\tif (axisOptions.scaleType === ScaleTypes.TIME) {\n\t\t\tconst spaceToAddToEdges = Tools.getProperty(\n\t\t\t\toptions,\n\t\t\t\t'timeScale',\n\t\t\t\t'addSpaceOnEdges'\n\t\t\t);\n\t\t\treturn addSpacingToTimeDomain(domain, spaceToAddToEdges);\n\t\t} else {\n\t\t\treturn addSpacingToContinuousDomain(\n\t\t\t\tdomain,\n\t\t\t\tConfiguration.axis.paddingRatio,\n\t\t\t\taxisOptions.scaleType\n\t\t\t);\n\t\t}\n\t}\n\n\tprotected findVerticalAxesPositions() {\n\t\tconst options = this.model.getOptions();\n\t\tconst axesOptions = Tools.getProperty(options, 'axes');\n\t\tconst dualAxes = this.isDualAxes();\n\n\t\t// If right axis has been specified as `main`\n\t\tif (\n\t\t\t(Tools.getProperty(axesOptions, AxisPositions.LEFT) === null &&\n\t\t\t\tTools.getProperty(axesOptions, AxisPositions.RIGHT) !== null) ||\n\t\t\tTools.getProperty(axesOptions, AxisPositions.RIGHT, 'main') ===\n\t\t\t\ttrue ||\n\t\t\t(dualAxes &&\n\t\t\t\tTools.getProperty(\n\t\t\t\t\taxesOptions,\n\t\t\t\t\tAxisPositions.LEFT,\n\t\t\t\t\t'correspondingDatasets'\n\t\t\t\t))\n\t\t) {\n\t\t\treturn {\n\t\t\t\tprimary: AxisPositions.RIGHT,\n\t\t\t\tsecondary: AxisPositions.LEFT,\n\t\t\t};\n\t\t}\n\n\t\treturn { primary: AxisPositions.LEFT, secondary: AxisPositions.RIGHT };\n\t}\n\n\tprotected findHorizontalAxesPositions() {\n\t\tconst options = this.model.getOptions();\n\t\tconst axesOptions = Tools.getProperty(options, 'axes');\n\t\tconst dualAxes = this.isDualAxes();\n\n\t\t// If top axis has been specified as `main`\n\t\tif (\n\t\t\t(Tools.getProperty(axesOptions, AxisPositions.BOTTOM) === null &&\n\t\t\t\tTools.getProperty(axesOptions, AxisPositions.TOP) !== null) ||\n\t\t\tTools.getProperty(axesOptions, AxisPositions.TOP, 'main') ===\n\t\t\t\ttrue ||\n\t\t\t(dualAxes &&\n\t\t\t\tTools.getProperty(\n\t\t\t\t\taxesOptions,\n\t\t\t\t\tAxisPositions.BOTTOM,\n\t\t\t\t\t'correspondingDatasets'\n\t\t\t\t))\n\t\t) {\n\t\t\treturn {\n\t\t\t\tprimary: AxisPositions.TOP,\n\t\t\t\tsecondary: AxisPositions.BOTTOM,\n\t\t\t};\n\t\t}\n\n\t\treturn { primary: AxisPositions.BOTTOM, secondary: AxisPositions.TOP };\n\t}\n\n\tprotected findDomainAndRangeAxesPositions(\n\t\tverticalAxesPositions,\n\t\thorizontalAxesPositions\n\t) {\n\t\tconst options = this.model.getOptions();\n\n\t\tconst mainVerticalAxisOptions = Tools.getProperty(\n\t\t\toptions,\n\t\t\t'axes',\n\t\t\tverticalAxesPositions.primary\n\t\t);\n\t\tconst mainHorizontalAxisOptions = Tools.getProperty(\n\t\t\toptions,\n\t\t\t'axes',\n\t\t\thorizontalAxesPositions.primary\n\t\t);\n\n\t\tconst mainVerticalScaleType =\n\t\t\tmainVerticalAxisOptions.scaleType || ScaleTypes.LINEAR;\n\t\tconst mainHorizontalScaleType =\n\t\t\tmainHorizontalAxisOptions.scaleType || ScaleTypes.LINEAR;\n\n\t\tconst result = {\n\t\t\tprimaryDomainAxisPosition: null,\n\t\t\tsecondaryDomainAxisPosition: null,\n\t\t\tprimaryRangeAxisPosition: null,\n\t\t\tsecondaryRangeAxisPosition: null,\n\t\t};\n\n\t\t// assign to to be a vertical chart by default\n\t\tresult.primaryDomainAxisPosition = horizontalAxesPositions.primary;\n\t\tresult.primaryRangeAxisPosition = verticalAxesPositions.primary;\n\t\t// secondary axes\n\t\tresult.secondaryDomainAxisPosition = horizontalAxesPositions.secondary;\n\t\tresult.secondaryRangeAxisPosition = verticalAxesPositions.secondary;\n\n\t\t// if neither the horizontal axes are label or time\n\t\t// and atleast one of the main vertical ones are labels or time then it should be horizontal\n\t\tif (\n\t\t\t(!(\n\t\t\t\tmainHorizontalScaleType === ScaleTypes.LABELS ||\n\t\t\t\tmainHorizontalScaleType === ScaleTypes.TIME\n\t\t\t) &&\n\t\t\t\tmainVerticalScaleType === ScaleTypes.LABELS) ||\n\t\t\tmainVerticalScaleType === ScaleTypes.TIME\n\t\t) {\n\t\t\tresult.primaryDomainAxisPosition = verticalAxesPositions.primary;\n\t\t\tresult.primaryRangeAxisPosition = horizontalAxesPositions.primary;\n\t\t\t// secondary axes\n\t\t\tresult.secondaryDomainAxisPosition =\n\t\t\t\tverticalAxesPositions.secondary;\n\t\t\tresult.secondaryRangeAxisPosition =\n\t\t\t\thorizontalAxesPositions.secondary;\n\t\t}\n\n\t\treturn result;\n\t}\n\n\tprotected getScaleDomain(axisPosition: AxisPositions) {\n\t\tconst options = this.model.getOptions();\n\t\tconst axisOptions = Tools.getProperty(options, 'axes', axisPosition);\n\t\tconst bounds = Tools.getProperty(options, 'bounds');\n\t\tconst { includeZero } = axisOptions;\n\t\tconst scaleType =\n\t\t\tTools.getProperty(axisOptions, 'scaleType') || ScaleTypes.LINEAR;\n\n\t\tif (this.model.isDataEmpty()) {\n\t\t\treturn [];\n\t\t}\n\n\t\tif (axisOptions.binned) {\n\t\t\tconst { bins } = this.model.getBinConfigurations();\n\n\t\t\treturn [0, max(bins, (d) => d.length)];\n\t\t} else if (axisOptions.limitDomainToBins) {\n\t\t\tconst { bins } = this.model.getBinConfigurations();\n\t\t\tconst stackKeys = this.model.getStackKeys({ bins });\n\n\t\t\treturn [\n\t\t\t\tstackKeys[0].split('-')[0],\n\t\t\t\tstackKeys[stackKeys.length - 1].split('-')[1],\n\t\t\t];\n\t\t}\n\n\t\tconst displayData = this.model.getDisplayData();\n\t\tconst {\n\t\t\textendLinearDomainBy,\n\t\t\tmapsTo,\n\t\t\tpercentage,\n\t\t\tthresholds,\n\t\t} = axisOptions;\n\t\tconst {\n\t\t\treference: ratioReference,\n\t\t\tcompareTo: ratioCompareTo,\n\t\t} = Configuration.axis.ratio;\n\n\t\t// If domain is specified return that domain\n\t\tif (axisOptions.domain) {\n\t\t\tif (scaleType === ScaleTypes.LABELS) {\n\t\t\t\treturn axisOptions.domain;\n\t\t\t} else if (scaleType === ScaleTypes.TIME) {\n\t\t\t\taxisOptions.domain = axisOptions.domain.map((d) =>\n\t\t\t\t\td.getTime === undefined ? new Date(d) : d\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn this.extendsDomain(axisPosition, axisOptions.domain);\n\t\t}\n\n\t\t// Return [0, 100] for percentage axis scale\n\t\tif (percentage) {\n\t\t\treturn [0, 100];\n\t\t}\n\n\t\t// If scale is a LABELS scale, return some labels as the domain\n\t\tif (axisOptions && scaleType === ScaleTypes.LABELS) {\n\t\t\t// Get unique values\n\t\t\treturn Tools.removeArrayDuplicates(\n\t\t\t\tdisplayData.map((d) => d[mapsTo])\n\t\t\t);\n\t\t}\n\n\t\t// Get the extent of the domain\n\t\tlet domain;\n\t\tlet allDataValues;\n\t\tconst dataGroupNames = this.model.getDataGroupNames();\n\n\t\tif (scaleType === ScaleTypes.LABELS_RATIO) {\n\t\t\treturn displayData.map(\n\t\t\t\t(datum) => `${datum[ratioReference]}/${datum[ratioCompareTo]}`\n\t\t\t);\n\t\t} else if (scaleType === ScaleTypes.TIME) {\n\t\t\tallDataValues = displayData.map(\n\t\t\t\t(datum) => +new Date(datum[mapsTo])\n\t\t\t);\n\t\t} else if (bounds && options.axes) {\n\t\t\tallDataValues = [];\n\n\t\t\tdisplayData.forEach((datum) => {\n\t\t\t\tallDataValues.push(datum[mapsTo]);\n\n\t\t\t\tif (datum[bounds.upperBoundMapsTo]) {\n\t\t\t\t\tallDataValues.push(datum[bounds.upperBoundMapsTo]);\n\t\t\t\t}\n\t\t\t\tif (datum[bounds.lowerBoundMapsTo]) {\n\t\t\t\t\tallDataValues.push(datum[bounds.lowerBoundMapsTo]);\n\t\t\t\t}\n\t\t\t});\n\t\t} else if (\n\t\t\taxisOptions.stacked === true &&\n\t\t\tdataGroupNames &&\n\t\t\taxisPosition === this.getRangeAxisPosition()\n\t\t) {\n\t\t\tconst { groupMapsTo } = options.data;\n\t\t\tconst dataValuesGroupedByKeys = this.model.getDataValuesGroupedByKeys(\n\t\t\t\t{\n\t\t\t\t\tgroups: dataGroupNames,\n\t\t\t\t}\n\t\t\t);\n\t\t\tconst nonStackedGroupsData = displayData.filter(\n\t\t\t\t(datum) => !dataGroupNames.includes(datum[groupMapsTo])\n\t\t\t);\n\n\t\t\tlet stackedValues = [];\n\t\t\tdataValuesGroupedByKeys.forEach((dataValues) => {\n\t\t\t\tconst { sharedStackKey, ...numericalValues } = dataValues;\n\n\t\t\t\tlet positiveSum = 0,\n\t\t\t\t\tnegativeSum = 0;\n\t\t\t\tObject.values(numericalValues).forEach((value: number) => {\n\t\t\t\t\tif (!isNaN(value)) {\n\t\t\t\t\t\tif (value < 0) {\n\t\t\t\t\t\t\tnegativeSum += value;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tpositiveSum += value;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tstackedValues.push([negativeSum, positiveSum]);\n\t\t\t});\n\n\t\t\tallDataValues = [\n\t\t\t\t...Tools.flatten(stackedValues),\n\t\t\t\t...nonStackedGroupsData.map((datum) => datum[mapsTo]),\n\t\t\t];\n\t\t} else {\n\t\t\tallDataValues = [];\n\n\t\t\tdisplayData.forEach((datum) => {\n\t\t\t\tconst value = datum[mapsTo];\n\t\t\t\tif (Array.isArray(value) && value.length === 2) {\n\t\t\t\t\tallDataValues.push(value[0]);\n\t\t\t\t\tallDataValues.push(value[1]);\n\t\t\t\t} else {\n\t\t\t\t\tif (extendLinearDomainBy) {\n\t\t\t\t\t\tallDataValues.push(\n\t\t\t\t\t\t\tMath.max(datum[mapsTo], datum[extendLinearDomainBy])\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tallDataValues.push(value);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\t// Time can never be 0 and log of base 0 is -Infinity\n\t\tif (\n\t\t\tscaleType !== ScaleTypes.TIME &&\n\t\t\tscaleType !== ScaleTypes.LOG &&\n\t\t\tincludeZero\n\t\t) {\n\t\t\tallDataValues.push(0);\n\t\t}\n\n\t\t// Add threshold values into the scale\n\t\tif (thresholds && thresholds.length > 0) {\n\t\t\tthresholds.forEach((threshold) => {\n\t\t\t\tconst thresholdValue = Tools.getProperty(threshold, 'value');\n\t\t\t\tif (thresholdValue !== null) allDataValues.push(thresholdValue);\n\t\t\t});\n\t\t}\n\n\t\tdomain = extent(allDataValues);\n\t\tdomain = this.extendsDomain(axisPosition, domain);\n\n\t\treturn domain;\n\t}\n\n\tprotected createScale(axisPosition: AxisPositions) {\n\t\tconst options = this.model.getOptions();\n\t\tconst axisOptions = Tools.getProperty(options, 'axes', axisPosition);\n\n\t\tif (!axisOptions) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst scaleType =\n\t\t\tTools.getProperty(axisOptions, 'scaleType') || ScaleTypes.LINEAR;\n\t\tthis.scaleTypes[axisPosition] = scaleType;\n\n\t\tlet scale;\n\t\tif (scaleType === ScaleTypes.TIME) {\n\t\t\tscale = scaleTime();\n\t\t} else if (scaleType === ScaleTypes.LOG) {\n\t\t\tscale = scaleLog().base(axisOptions.base || 10);\n\t\t} else if (\n\t\t\tscaleType === ScaleTypes.LABELS ||\n\t\t\tscaleType === ScaleTypes.LABELS_RATIO\n\t\t) {\n\t\t\tscale = scaleBand();\n\t\t} else {\n\t\t\tscale = scaleLinear();\n\t\t}\n\n\t\tscale.domain(this.getScaleDomain(axisPosition));\n\n\t\treturn scale;\n\t}\n\n\tprotected getHighestDomainThreshold(): null | {\n\t\tthreshold: ThresholdOptions;\n\t\tscaleValue: number;\n\t} {\n\t\tconst axesOptions = Tools.getProperty(this.model.getOptions(), 'axes');\n\t\tconst domainAxisPosition = this.getDomainAxisPosition();\n\n\t\tconst { thresholds } = axesOptions[domainAxisPosition];\n\n\t\t// Check if thresholds exist & is not empty\n\t\tif (\n\t\t\t!Array.isArray(thresholds) ||\n\t\t\t(Array.isArray(thresholds) && !thresholds.length)\n\t\t) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst domainScale = this.getDomainScale();\n\t\t// Find the highest threshold for the domain\n\t\tconst highestThreshold = thresholds.sort(\n\t\t\t(a, b) => b.value - a.value\n\t\t)[0];\n\n\t\tconst scaleType = this.getScaleTypeByPosition(domainAxisPosition);\n\t\tif (\n\t\t\tscaleType === ScaleTypes.TIME &&\n\t\t\t(typeof highestThreshold.value === 'string' ||\n\t\t\t\thighestThreshold.value.getTime === undefined)\n\t\t) {\n\t\t\thighestThreshold.value = new Date(highestThreshold.value);\n\t\t}\n\n\t\treturn {\n\t\t\tthreshold: highestThreshold,\n\t\t\tscaleValue: domainScale(highestThreshold.value),\n\t\t};\n\t}\n\n\tprotected getHighestRangeThreshold(): null | {\n\t\tthreshold: ThresholdOptions;\n\t\tscaleValue: number;\n\t} {\n\t\tconst axesOptions = Tools.getProperty(this.model.getOptions(), 'axes');\n\t\tconst rangeAxisPosition = this.getRangeAxisPosition();\n\n\t\tconst { thresholds } = axesOptions[rangeAxisPosition];\n\n\t\t// Check if thresholds exist & is not empty\n\t\tif (\n\t\t\t!Array.isArray(thresholds) ||\n\t\t\t(Array.isArray(thresholds) && !thresholds.length)\n\t\t) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst rangeScale = this.getRangeScale();\n\t\t// Find the highest threshold for the range\n\t\tconst highestThreshold = thresholds.sort(\n\t\t\t(a, b) => b.value - a.value\n\t\t)[0];\n\n\t\treturn {\n\t\t\tthreshold: highestThreshold,\n\t\t\tscaleValue: rangeScale(highestThreshold.value),\n\t\t};\n\t}\n}\n\nfunction addSpacingToTimeDomain(domain: any, spaceToAddToEdges: number) {\n\tconst startDate = new Date(domain[0]);\n\tconst endDate = new Date(domain[1]);\n\n\tif (differenceInYears(endDate, startDate) > 1) {\n\t\treturn [\n\t\t\tsubYears(startDate, spaceToAddToEdges),\n\t\t\taddYears(endDate, spaceToAddToEdges),\n\t\t];\n\t}\n\n\tif (differenceInMonths(endDate, startDate) > 1) {\n\t\treturn [\n\t\t\tsubMonths(startDate, spaceToAddToEdges),\n\t\t\taddMonths(endDate, spaceToAddToEdges),\n\t\t];\n\t}\n\n\tif (differenceInDays(endDate, startDate) > 1) {\n\t\treturn [\n\t\t\tsubDays(startDate, spaceToAddToEdges),\n\t\t\taddDays(endDate, spaceToAddToEdges),\n\t\t];\n\t}\n\n\tif (differenceInHours(endDate, startDate) > 1) {\n\t\treturn [\n\t\t\tsubHours(startDate, spaceToAddToEdges),\n\t\t\taddHours(endDate, spaceToAddToEdges),\n\t\t];\n\t}\n\n\tif (differenceInMinutes(endDate, startDate) > 30) {\n\t\treturn [\n\t\t\tsubMinutes(startDate, spaceToAddToEdges * 30),\n\t\t\taddMinutes(endDate, spaceToAddToEdges * 30),\n\t\t];\n\t}\n\n\tif (differenceInMinutes(endDate, startDate) > 1) {\n\t\treturn [\n\t\t\tsubMinutes(startDate, spaceToAddToEdges),\n\t\t\taddMinutes(endDate, spaceToAddToEdges),\n\t\t];\n\t}\n\n\tif (differenceInSeconds(endDate, startDate) > 15) {\n\t\treturn [\n\t\t\tsubSeconds(startDate, spaceToAddToEdges * 15),\n\t\t\taddSeconds(endDate, spaceToAddToEdges * 15),\n\t\t];\n\t}\n\n\tif (differenceInSeconds(endDate, startDate) > 1) {\n\t\treturn [\n\t\t\tsubSeconds(startDate, spaceToAddToEdges),\n\t\t\taddSeconds(endDate, spaceToAddToEdges),\n\t\t];\n\t}\n\n\treturn [startDate, endDate];\n}\n\nfunction addSpacingToContinuousDomain(\n\t[lower, upper]: number[],\n\tpaddingRatio: number,\n\tscaleType?: ScaleTypes\n) {\n\tconst domainLength = upper - lower;\n\tconst padding = domainLength * paddingRatio;\n\n\t// If padding crosses 0, keep 0 as new upper bound\n\tconst newUpper = upper <= 0 && upper + padding > 0 ? 0 : upper + padding;\n\t// If padding crosses 0, keep 0 as new lower bound\n\tlet newLower = lower >= 0 && lower - padding < 0 ? 0 : lower - padding;\n\n\t// Log of base 0 or a negative number is -Infinity\n\tif (scaleType === ScaleTypes.LOG && newLower <= 0) {\n\t\tif (lower <= 0) {\n\t\t\tthrow Error(\n\t\t\t\t'Data must have values greater than 0 if log scale type is used.'\n\t\t\t);\n\t\t}\n\t\tnewLower = lower;\n\t}\n\n\treturn [newLower, newUpper];\n}\n"]}
|
package/tsconfig.tsbuildinfo
CHANGED
|
@@ -154,7 +154,7 @@
|
|
|
154
154
|
"signature": "40479353a4fea9dd15e631f03b9bf3d724d627a49c7491ac3c3781275de9ba88"
|
|
155
155
|
},
|
|
156
156
|
"../src/configuration.ts": {
|
|
157
|
-
"version": "
|
|
157
|
+
"version": "0e14ed682c0c42ed3a12c2dbb0f22bd2a7b6515f69c95d9742fae67154485546",
|
|
158
158
|
"signature": "bf067832dce54806fcbae20b3c812f4f4c87f362d322ede6f3bc416a92d9dbcd"
|
|
159
159
|
},
|
|
160
160
|
"../../../node_modules/@types/d3-time/index.d.ts": {
|
|
@@ -210,7 +210,7 @@
|
|
|
210
210
|
"signature": "7b51ac945f253db7d26cdbdf47268cf6a53f6e920fcdb407d9479a7f8ebeed27"
|
|
211
211
|
},
|
|
212
212
|
"../src/services/scales-cartesian.ts": {
|
|
213
|
-
"version": "
|
|
213
|
+
"version": "7e9dd3ec44711f7ba41b9e4519b3a0ea3e515b166abf4e0d5651bbe32cfe1d2d",
|
|
214
214
|
"signature": "3234c8326245bd904350245f2fe7fd43a7789b9c74adbead1c6ee21665e42867"
|
|
215
215
|
},
|
|
216
216
|
"../src/services/curves.ts": {
|
|
@@ -242,8 +242,8 @@
|
|
|
242
242
|
"signature": "e13ca1760c1d894f0cbb054be895f12207ff8a8708be12a18944832c02dd7ab2"
|
|
243
243
|
},
|
|
244
244
|
"../src/interfaces/components.ts": {
|
|
245
|
-
"version": "
|
|
246
|
-
"signature": "
|
|
245
|
+
"version": "b4112fc9b7a3097ddcf53dccbf035a241d750725da80b6f08cd6a8234ac98910",
|
|
246
|
+
"signature": "841228db24352df234b121168742ee73b9657d195d84f99b336322a692f61905"
|
|
247
247
|
},
|
|
248
248
|
"../../../node_modules/@types/d3-axis/index.d.ts": {
|
|
249
249
|
"version": "b3393902df89f63a8da74a8003ee951164b2556608d256c248d6d79510becbb2",
|
|
@@ -254,8 +254,8 @@
|
|
|
254
254
|
"signature": "c9e5b626cb6cc90b535dcaa930e64a4e033bfcb132abfd16a07edc4deeb1d99c"
|
|
255
255
|
},
|
|
256
256
|
"../src/interfaces/charts.ts": {
|
|
257
|
-
"version": "
|
|
258
|
-
"signature": "
|
|
257
|
+
"version": "ee9b0d121d33b4b98ff426b913abf9381ec121c647cfa93413d9abca6478d1be",
|
|
258
|
+
"signature": "0a1a321f59ac9dbe13703d28c6438c73ab34410fd6eae306c3fa9fb669923cc9"
|
|
259
259
|
},
|
|
260
260
|
"../src/interfaces/layout.ts": {
|
|
261
261
|
"version": "684de2d7c612bd74a9d8e866b0b94cc53bd824422be4b3d216dc6682614e5fe8",
|
|
@@ -338,7 +338,7 @@
|
|
|
338
338
|
"signature": "b50b9e4e54f85f3404cce1663d2b2328d3655247abfb90de37af3a26c4f2b4da"
|
|
339
339
|
},
|
|
340
340
|
"../src/components/graphs/bar.ts": {
|
|
341
|
-
"version": "
|
|
341
|
+
"version": "372d739a396b12b17e894424210f2b2293f2f3ed22ce6efa7d5003939d92d9a1",
|
|
342
342
|
"signature": "84bb153c86d8d45c6787f09d7c1b1a8088511049341e51fae3fc78b53dfa792a"
|
|
343
343
|
},
|
|
344
344
|
"../src/components/graphs/bar-simple.ts": {
|
|
@@ -350,7 +350,7 @@
|
|
|
350
350
|
"signature": "e9df64cff365d44924363c2399208593f62c626f724cb960469ccc79358dac1d"
|
|
351
351
|
},
|
|
352
352
|
"../src/components/graphs/bar-stacked.ts": {
|
|
353
|
-
"version": "
|
|
353
|
+
"version": "41a21e328bcc0db865a83ebc3a8fbfd4fb3e62bec91f74bdd78bac9b72da8369",
|
|
354
354
|
"signature": "4b1d138dbfffdc47adf6486a28996e85599bec8dfaa8c833fb277003848d97af"
|
|
355
355
|
},
|
|
356
356
|
"../src/components/graphs/boxplot.ts": {
|
|
@@ -422,7 +422,7 @@
|
|
|
422
422
|
"signature": "4798872bc73b632e7cbb5dcb7211c2d991234c273068d0dbc0c87f0e776d0ce4"
|
|
423
423
|
},
|
|
424
424
|
"../src/components/graphs/radar.ts": {
|
|
425
|
-
"version": "
|
|
425
|
+
"version": "28535dfe2b5adb891f66acc7d58ac4effc62cf2f14a0f1ce0b4e7bf3965585c2",
|
|
426
426
|
"signature": "9da37caa7dbc85f04fb3b8471e8a7e732298bd5bc664c399fecc6c0003850e6c"
|
|
427
427
|
},
|
|
428
428
|
"../src/components/graphs/circle-pack.ts": {
|
|
@@ -598,7 +598,7 @@
|
|
|
598
598
|
"signature": "3a1fe784c2963d2d901699458743db24c1a67b21272773f70df4d78dbef63914"
|
|
599
599
|
},
|
|
600
600
|
"../src/charts/meter.ts": {
|
|
601
|
-
"version": "
|
|
601
|
+
"version": "d3096fc30b085556b345c9324b4360d6e315a11c7e1d8420da31ef03893c9fd4",
|
|
602
602
|
"signature": "f6d5c0867ab7123af740241442019544fa419e988af53618bd548a765e754be5"
|
|
603
603
|
},
|
|
604
604
|
"../src/model/radar.ts": {
|
|
@@ -1658,6 +1658,7 @@
|
|
|
1658
1658
|
"../src/components/graphs/bar.ts": [
|
|
1659
1659
|
"../src/components/component.ts",
|
|
1660
1660
|
"../src/services/index.ts",
|
|
1661
|
+
"../src/tools.ts",
|
|
1661
1662
|
"../../../node_modules/date-fns/typings.d.ts",
|
|
1662
1663
|
"../node_modules/@types/node/fs.d.ts",
|
|
1663
1664
|
"../node_modules/@types/node/ts3.2/fs.d.ts",
|