@carbon/charts 0.30.7 → 0.30.8

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.
Files changed (138) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/build/demo/data/bar.d.ts +56 -94
  3. package/build/demo/data/bubble.d.ts +58 -13
  4. package/build/demo/data/donut.d.ts +3 -6
  5. package/build/demo/data/line.d.ts +35 -35
  6. package/build/demo/data/pie.d.ts +3 -6
  7. package/build/demo/data/scatter.d.ts +33 -20
  8. package/build/demo/data/step.d.ts +15 -16
  9. package/build/demo/data/time-series-axis.d.ts +12 -48
  10. package/build/src/charts/bar-grouped.d.ts +2 -2
  11. package/build/src/charts/bar-simple.d.ts +2 -4
  12. package/build/src/components/essentials/legend.d.ts +0 -4
  13. package/build/src/components/essentials/tooltip-bar.d.ts +1 -1
  14. package/build/src/components/essentials/tooltip-pie.d.ts +5 -0
  15. package/build/src/components/essentials/tooltip-scatter.d.ts +1 -1
  16. package/build/src/components/graphs/bar-grouped.d.ts +6 -4
  17. package/build/src/components/graphs/bar-simple.d.ts +0 -1
  18. package/build/src/components/graphs/bar-stacked.d.ts +0 -1
  19. package/build/src/components/graphs/bubble.d.ts +0 -1
  20. package/build/src/components/graphs/line.d.ts +3 -1
  21. package/build/src/components/graphs/pie.d.ts +0 -1
  22. package/build/src/components/graphs/scatter.d.ts +0 -1
  23. package/build/src/components/index.d.ts +1 -0
  24. package/build/src/interfaces/axis-scales.d.ts +4 -16
  25. package/build/src/interfaces/charts.d.ts +23 -1
  26. package/build/src/interfaces/enums.d.ts +0 -4
  27. package/build/src/model-pie.d.ts +1 -7
  28. package/build/src/model.d.ts +31 -13
  29. package/build/src/services/scales-cartesian.d.ts +11 -3
  30. package/build/src/tools.d.ts +2 -2
  31. package/build/stories/tutorials.stories.d.ts +1 -0
  32. package/bundle.js +1 -1
  33. package/charts/bar-grouped.d.ts +2 -2
  34. package/charts/bar-grouped.js.map +1 -1
  35. package/charts/bar-simple.d.ts +2 -4
  36. package/charts/bar-simple.js +0 -2
  37. package/charts/bar-simple.js.map +1 -1
  38. package/charts/donut.js +2 -2
  39. package/charts/donut.js.map +1 -1
  40. package/charts/pie.js +2 -2
  41. package/charts/pie.js.map +1 -1
  42. package/components/axes/grid.js +10 -17
  43. package/components/axes/grid.js.map +1 -1
  44. package/components/essentials/legend.d.ts +0 -4
  45. package/components/essentials/legend.js +8 -22
  46. package/components/essentials/legend.js.map +1 -1
  47. package/components/essentials/tooltip-bar.d.ts +1 -1
  48. package/components/essentials/tooltip-bar.js +12 -4
  49. package/components/essentials/tooltip-bar.js.map +1 -1
  50. package/components/essentials/tooltip-pie.d.ts +5 -0
  51. package/components/essentials/tooltip-pie.js +40 -0
  52. package/components/essentials/tooltip-pie.js.map +1 -0
  53. package/components/essentials/tooltip-scatter.d.ts +1 -1
  54. package/components/essentials/tooltip-scatter.js +8 -6
  55. package/components/essentials/tooltip-scatter.js.map +1 -1
  56. package/components/essentials/tooltip.js +13 -16
  57. package/components/essentials/tooltip.js.map +1 -1
  58. package/components/graphs/bar-grouped.d.ts +6 -4
  59. package/components/graphs/bar-grouped.js +58 -30
  60. package/components/graphs/bar-grouped.js.map +1 -1
  61. package/components/graphs/bar-simple.d.ts +0 -1
  62. package/components/graphs/bar-simple.js +10 -28
  63. package/components/graphs/bar-simple.js.map +1 -1
  64. package/components/graphs/bar-stacked.d.ts +0 -1
  65. package/components/graphs/bar-stacked.js +27 -108
  66. package/components/graphs/bar-stacked.js.map +1 -1
  67. package/components/graphs/bubble.d.ts +0 -1
  68. package/components/graphs/bubble.js +16 -20
  69. package/components/graphs/bubble.js.map +1 -1
  70. package/components/graphs/donut.js +1 -1
  71. package/components/graphs/donut.js.map +1 -1
  72. package/components/graphs/line.d.ts +3 -1
  73. package/components/graphs/line.js +41 -30
  74. package/components/graphs/line.js.map +1 -1
  75. package/components/graphs/pie.d.ts +0 -1
  76. package/components/graphs/pie.js +11 -18
  77. package/components/graphs/pie.js.map +1 -1
  78. package/components/graphs/scatter.d.ts +0 -1
  79. package/components/graphs/scatter.js +24 -39
  80. package/components/graphs/scatter.js.map +1 -1
  81. package/components/index.d.ts +1 -0
  82. package/components/index.js +1 -0
  83. package/components/index.js.map +1 -1
  84. package/configuration.js +7 -0
  85. package/configuration.js.map +1 -1
  86. package/demo/data/bar.d.ts +56 -94
  87. package/demo/data/bar.js +106 -271
  88. package/demo/data/bar.js.map +1 -1
  89. package/demo/data/bubble.d.ts +58 -13
  90. package/demo/data/bubble.js +74 -174
  91. package/demo/data/bubble.js.map +1 -1
  92. package/demo/data/bundle.js +1 -1
  93. package/demo/data/donut.d.ts +3 -6
  94. package/demo/data/index.js +22 -4
  95. package/demo/data/index.js.map +1 -1
  96. package/demo/data/line.d.ts +35 -35
  97. package/demo/data/line.js +70 -196
  98. package/demo/data/line.js.map +1 -1
  99. package/demo/data/pie.d.ts +3 -6
  100. package/demo/data/pie.js +8 -10
  101. package/demo/data/pie.js.map +1 -1
  102. package/demo/data/scatter.d.ts +33 -20
  103. package/demo/data/scatter.js +50 -68
  104. package/demo/data/scatter.js.map +1 -1
  105. package/demo/data/step.d.ts +15 -16
  106. package/demo/data/time-series-axis.d.ts +12 -48
  107. package/demo/data/time-series-axis.js +34 -46
  108. package/demo/data/time-series-axis.js.map +1 -1
  109. package/demo/styles.css +28 -0
  110. package/demo/styles.css.map +1 -1
  111. package/demo/styles.min.css +1 -1
  112. package/demo/styles.min.css.map +1 -1
  113. package/demo/tsconfig.tsbuildinfo +36 -35
  114. package/interfaces/axis-scales.d.ts +4 -16
  115. package/interfaces/axis-scales.js.map +1 -1
  116. package/interfaces/charts.d.ts +23 -1
  117. package/interfaces/charts.js.map +1 -1
  118. package/interfaces/enums.d.ts +0 -4
  119. package/interfaces/enums.js +0 -5
  120. package/interfaces/enums.js.map +1 -1
  121. package/model-pie.d.ts +1 -7
  122. package/model-pie.js +2 -107
  123. package/model-pie.js.map +1 -1
  124. package/model.d.ts +31 -13
  125. package/model.js +199 -75
  126. package/model.js.map +1 -1
  127. package/package.json +3 -1
  128. package/services/scales-cartesian.d.ts +11 -3
  129. package/services/scales-cartesian.js +104 -122
  130. package/services/scales-cartesian.js.map +1 -1
  131. package/tools.d.ts +2 -2
  132. package/tools.js +23 -2
  133. package/tools.js.map +1 -1
  134. package/tsconfig.tsbuildinfo +72 -73
  135. package/build/src/model-simple-bar.d.ts +0 -11
  136. package/model-simple-bar.d.ts +0 -11
  137. package/model-simple-bar.js +0 -88
  138. package/model-simple-bar.js.map +0 -1
@@ -3,6 +3,7 @@ export * from "./essentials/legend";
3
3
  export * from "./essentials/title";
4
4
  export * from "./essentials/tooltip";
5
5
  export * from "./essentials/tooltip-bar";
6
+ export * from "./essentials/tooltip-pie";
6
7
  export * from "./essentials/tooltip-scatter";
7
8
  export * from "./graphs/bar-simple";
8
9
  export * from "./graphs/bar-grouped";
@@ -4,6 +4,7 @@ export * from "./essentials/legend";
4
4
  export * from "./essentials/title";
5
5
  export * from "./essentials/tooltip";
6
6
  export * from "./essentials/tooltip-bar";
7
+ export * from "./essentials/tooltip-pie";
7
8
  export * from "./essentials/tooltip-scatter";
8
9
  // GRAPHS
9
10
  export * from "./graphs/bar-simple";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAE5B,aAAa;AACb,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC;AAE7C,SAAS;AACT,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAE/B,SAAS;AACT,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAEhC,OAAO;AACP,cAAc,6BAA6B,CAAC;AAC5C,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC","sourcesContent":["export * from \"./component\";\n\n// ESSENTIALS\nexport * from \"./essentials/legend\";\nexport * from \"./essentials/title\";\nexport * from \"./essentials/tooltip\";\nexport * from \"./essentials/tooltip-bar\";\nexport * from \"./essentials/tooltip-scatter\";\n\n// GRAPHS\nexport * from \"./graphs/bar-simple\";\nexport * from \"./graphs/bar-grouped\";\nexport * from \"./graphs/bar-stacked\";\nexport * from \"./graphs/bubble\";\nexport * from \"./graphs/line\";\nexport * from \"./graphs/scatter\";\nexport * from \"./graphs/pie\";\nexport * from \"./graphs/donut\";\n\n// Layout\nexport * from \"./layout/spacer\";\nexport * from \"./layout/layout\";\n\n// MISC\nexport * from \"./axes/two-dimensional-axes\";\nexport * from \"./axes/axis\";\nexport * from \"./axes/grid\";\nexport * from \"./axes/zero-line\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAE5B,aAAa;AACb,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC;AAE7C,SAAS;AACT,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAE/B,SAAS;AACT,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAEhC,OAAO;AACP,cAAc,6BAA6B,CAAC;AAC5C,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC","sourcesContent":["export * from \"./component\";\n\n// ESSENTIALS\nexport * from \"./essentials/legend\";\nexport * from \"./essentials/title\";\nexport * from \"./essentials/tooltip\";\nexport * from \"./essentials/tooltip-bar\";\nexport * from \"./essentials/tooltip-pie\";\nexport * from \"./essentials/tooltip-scatter\";\n\n// GRAPHS\nexport * from \"./graphs/bar-simple\";\nexport * from \"./graphs/bar-grouped\";\nexport * from \"./graphs/bar-stacked\";\nexport * from \"./graphs/bubble\";\nexport * from \"./graphs/line\";\nexport * from \"./graphs/scatter\";\nexport * from \"./graphs/pie\";\nexport * from \"./graphs/donut\";\n\n// Layout\nexport * from \"./layout/spacer\";\nexport * from \"./layout/layout\";\n\n// MISC\nexport * from \"./axes/two-dimensional-axes\";\nexport * from \"./axes/axis\";\nexport * from \"./axes/grid\";\nexport * from \"./axes/zero-line\";\n"]}
package/configuration.js CHANGED
@@ -109,6 +109,12 @@ var chart = {
109
109
  legend: legend,
110
110
  style: {
111
111
  prefix: "cc"
112
+ },
113
+ data: {
114
+ groupMapsTo: "group"
115
+ },
116
+ color: {
117
+ scale: null
112
118
  }
113
119
  };
114
120
  /**
@@ -174,6 +180,7 @@ var scatterChart = Tools.merge({}, axisChart, {
174
180
  */
175
181
  var bubbleChart = Tools.merge({}, axisChart, {
176
182
  bubble: {
183
+ radiusMapsTo: "radius",
177
184
  radiusRange: function (chartSize, data) {
178
185
  var smallerChartDimension = Math.min(chartSize.width, chartSize.height);
179
186
  return [
@@ -1 +1 @@
1
- {"version":3,"file":"configuration.js","sourceRoot":"","sources":["configuration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAkBN,eAAe,EAEf,MAAM,cAAc,CAAC;AACtB,OAAO,gBAAgB,MAAM,6BAA6B,CAAC;AAE3D;;;;GAIG;AAEH;;GAEG;AACH,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ACR;CACD,CAAC;AAEF,MAAM,CAAC,IAAM,sBAAsB,GAAG,GAAG,CAAC;AAC1C,MAAM,CAAC,IAAM,wBAAwB,GAAG,GAAG,CAAC","sourcesContent":["import { Tools } from \"./tools\";\nimport {\n\tBaseChartOptions,\n\tAxisChartOptions,\n\tScatterChartOptions,\n\tLineChartOptions,\n\tBarChartOptions,\n\tStackedBarChartOptions,\n\tPieChartOptions,\n\tDonutChartOptions,\n\tBubbleChartOptions,\n\t// Components\n\tGridOptions,\n\tAxesOptions,\n\tTimeScaleOptions,\n\tTooltipOptions,\n\tAxisTooltipOptions,\n\tBarTooltipOptions,\n\tLegendOptions,\n\tLegendPositions,\n\tStackedBarOptions\n} from \"./interfaces\";\nimport enUSLocaleObject from \"date-fns/locale/en-US/index\";\n\n/*\n *****************************\n * User configurable options *\n *****************************\n */\n\n/**\n * Legend options\n */\nexport const legend: LegendOptions = {\n\tposition: LegendPositions.BOTTOM,\n\tclickable: true,\n\tenabled: true,\n\titems: {\n\t\tstatus: {\n\t\t\tACTIVE: 1,\n\t\t\tDISABLED: 0\n\t\t},\n\t\thorizontalSpace: 12,\n\t\tverticalSpace: 24,\n\t\ttextYOffset: 8\n\t},\n\tcheckbox: {\n\t\tradius: 6.5,\n\t\tspaceAfter: 4\n\t}\n};\n\n/**\n * Grid options\n */\nexport const grid: GridOptions = {\n\tx: {\n\t\tnumberOfTicks: 5\n\t},\n\ty: {\n\t\tnumberOfTicks: 5\n\t}\n};\n\n/**\n * Tooltip options\n */\nexport const baseTooltip: TooltipOptions = {\n\tdatapoint: {\n\t\thorizontalOffset: 10,\n\t\tenabled: true\n\t},\n\ttitle: {\n\t\tverticalOffset: .75,\n\t\twidth: .4\n\t}\n};\n\nexport const axisChartTooltip: AxisTooltipOptions = Tools.merge({}, baseTooltip, {\n\tgridline: {\n\t\tenabled: true,\n\t\tthreshold: 0.25\n\t}\n} as AxisTooltipOptions);\n\nexport const barChartTooltip: BarTooltipOptions = Tools.merge({}, axisChartTooltip, {\n\tdatapoint: {\n\t\tverticalOffset: 4\n\t},\n\tgridline: {\n\t\tenabled: false\n\t}\n} as BarTooltipOptions);\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 = {\n\ttop: {\n\t\tincludeZero: true\n\t},\n\tbottom: {\n\t\tincludeZero: true\n\t},\n\tleft: {\n\t\tincludeZero: true\n\t},\n\tright: {\n\t\tincludeZero: true\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\t\"minute\": { primary: \"MMM d, p\", secondary: \"p\" },\n\t\t\"30minutes\": { primary: \"MMM d, p\", secondary: \"p\" },\n\t\t\"hourly\": { primary: \"MMM d, hh a\", secondary: \"hh a\" },\n\t\t\"daily\": { primary: \"MMM d\", secondary: \"d\" },\n\t\t\"weekly\": { primary: \"eee, MMM d\", secondary: \"eee\" },\n\t\t\"monthly\": { primary: \"MMM yyyy\", secondary: \"MMM\" },\n\t\t\"quarterly\": { primary: \"QQQ ''yy\", secondary: \"QQQ\" },\n\t\t\"yearly\": { primary: \"yyyy\", secondary: \"yyyy\" }\n\t}\n};\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};\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\ttooltip: axisChartTooltip\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\ttooltip: barChartTooltip,\n} as BarChartOptions);\n\n/**\n * options specific to simple bar charts\n */\nconst simpleBarChart: BarChartOptions = Tools.merge({}, baseBarChart, {\n\n} as BarChartOptions);\n\n/**\n * options specific to simple bar charts\n */\nconst groupedBarChart: BarChartOptions = Tools.merge({}, baseBarChart, {\n\n} as BarChartOptions);\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 line charts\n */\nconst lineChart: LineChartOptions = Tools.merge({}, axisChart, {\n\tpoints: {\n\t\t// default point radius to 3\n\t\tradius: 3,\n\t\tfilled: false\n\t}\n} as LineChartOptions);\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}\n} as ScatterChartOptions);\n\n/**\n * options specific to bubble charts\n */\nconst bubbleChart: BubbleChartOptions = Tools.merge({}, axisChart, {\n\tbubble: {\n\t\tradiusRange: (chartSize, data) => {\n\t\t\tconst smallerChartDimension = Math.min(chartSize.width, chartSize.height);\n\t\t\treturn [\n\t\t\t\tsmallerChartDimension * 3 / 400,\n\t\t\t\tsmallerChartDimension * 25 / 400\n\t\t\t];\n\t\t},\n\t\tfillOpacity: 0.2\n\t}\n} as BubbleChartOptions);\n\n/**\n * options specific to pie charts\n */\nconst pieChart: PieChartOptions = Tools.merge({}, chart, {\n\tpie: {\n\t\tradiusOffset: -15,\n\t\tinnerRadius: 2,\n\t\tpadAngle: 0.007,\n\t\thoverArc: {\n\t\t\touterRadiusOffset: 3\n\t\t},\n\t\txOffset: 30,\n\t\tyOffset: 20,\n\t\tyOffsetCallout: 10,\n\t\tcallout: {\n\t\t\tminSliceDegree: 5,\n\t\t\toffsetX: 15,\n\t\t\toffsetY: 12,\n\t\t\thorizontalLineLength: 8,\n\t\t\ttextMargin: 2\n\t\t},\n\t\tlabels: {\n\t\t\tformatter: null\n\t\t}\n\t}\n} as PieChartOptions);\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 => Math.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}\n} as DonutChartOptions);\n\nexport const options = {\n\tchart,\n\taxisChart,\n\tsimpleBarChart,\n\tgroupedBarChart,\n\tstackedBarChart,\n\tbubbleChart,\n\tlineChart,\n\tscatterChart,\n\tpieChart,\n\tdonutChart\n};\n\n/**\n * Options for line behaviour\n */\nexport const lines = {\n\topacity: {\n\t\tunselected: 0.3,\n\t\tselected: 1\n\t}\n};\n\n/**\n * Base transition configuration\n */\nexport const transitions = {\n\tdefault: {\n\t\tduration: 300\n\t},\n\tpie_slice_mouseover: {\n\t\tduration: 100\n\t},\n\tpie_chart_titles: {\n\t\tduration: 375\n\t},\n\tgraph_element_mouseover_fill_update: {\n\t\tduration: 100\n\t},\n\tgraph_element_mouseout_fill_update: {\n\t\tduration: 100\n\t}\n};\n\nexport const axis = {\n\tticks: {\n\t\tnumber: 7,\n\t\trotateIfSmallerThan: 30\n\t},\n\tpaddingRatio: 0.1\n};\n\nexport const spacers = {\n\tdefault: {\n\t\tsize: 24\n\t}\n};\n\nexport const tickSpaceRatioVertical = 2.5;\nexport const tickSpaceRatioHorizontal = 3.5;\n"]}
1
+ {"version":3,"file":"configuration.js","sourceRoot":"","sources":["configuration.ts"],"names":[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AAE,GAAG;KACb;IACD,kCAAkC,EAAE;QACnC,QAAQ,EAAE,GAAG;KACb;CACD,CAAC;AAEF,MAAM,CAAC,IAAM,IAAI,GAAG;IACnB,KAAK,EAAE;QACN,MAAM,EAAE,CAAC;QACT,mBAAmB,EAAE,EAAE;KACvB;IACD,YAAY,EAAE,GAAG;CACjB,CAAC;AAEF,MAAM,CAAC,IAAM,OAAO,GAAG;IACtB,OAAO,EAAE;QACR,IAAI,EAAE,EAAE;KACR;CACD,CAAC;AAEF,MAAM,CAAC,IAAM,sBAAsB,GAAG,GAAG,CAAC;AAC1C,MAAM,CAAC,IAAM,wBAAwB,GAAG,GAAG,CAAC","sourcesContent":["import { Tools } from \"./tools\";\nimport {\n\tBaseChartOptions,\n\tAxisChartOptions,\n\tScatterChartOptions,\n\tLineChartOptions,\n\tBarChartOptions,\n\tStackedBarChartOptions,\n\tPieChartOptions,\n\tDonutChartOptions,\n\tBubbleChartOptions,\n\t// Components\n\tGridOptions,\n\tAxesOptions,\n\tTimeScaleOptions,\n\tTooltipOptions,\n\tAxisTooltipOptions,\n\tBarTooltipOptions,\n\tLegendOptions,\n\tLegendPositions,\n\tStackedBarOptions\n} from \"./interfaces\";\nimport enUSLocaleObject from \"date-fns/locale/en-US/index\";\n\n/*\n *****************************\n * User configurable options *\n *****************************\n */\n\n/**\n * Legend options\n */\nexport const legend: LegendOptions = {\n\tposition: LegendPositions.BOTTOM,\n\tclickable: true,\n\tenabled: true,\n\titems: {\n\t\tstatus: {\n\t\t\tACTIVE: 1,\n\t\t\tDISABLED: 0\n\t\t},\n\t\thorizontalSpace: 12,\n\t\tverticalSpace: 24,\n\t\ttextYOffset: 8\n\t},\n\tcheckbox: {\n\t\tradius: 6.5,\n\t\tspaceAfter: 4\n\t}\n};\n\n/**\n * Grid options\n */\nexport const grid: GridOptions = {\n\tx: {\n\t\tnumberOfTicks: 5\n\t},\n\ty: {\n\t\tnumberOfTicks: 5\n\t}\n};\n\n/**\n * Tooltip options\n */\nexport const baseTooltip: TooltipOptions = {\n\tdatapoint: {\n\t\thorizontalOffset: 10,\n\t\tenabled: true\n\t},\n\ttitle: {\n\t\tverticalOffset: .75,\n\t\twidth: .4\n\t}\n};\n\nexport const axisChartTooltip: AxisTooltipOptions = Tools.merge({}, baseTooltip, {\n\tgridline: {\n\t\tenabled: true,\n\t\tthreshold: 0.25\n\t}\n} as AxisTooltipOptions);\n\nexport const barChartTooltip: BarTooltipOptions = Tools.merge({}, axisChartTooltip, {\n\tdatapoint: {\n\t\tverticalOffset: 4\n\t},\n\tgridline: {\n\t\tenabled: false\n\t}\n} as BarTooltipOptions);\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 = {\n\ttop: {\n\t\tincludeZero: true\n\t},\n\tbottom: {\n\t\tincludeZero: true\n\t},\n\tleft: {\n\t\tincludeZero: true\n\t},\n\tright: {\n\t\tincludeZero: true\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\t\"minute\": { primary: \"MMM d, p\", secondary: \"p\" },\n\t\t\"30minutes\": { primary: \"MMM d, p\", secondary: \"p\" },\n\t\t\"hourly\": { primary: \"MMM d, hh a\", secondary: \"hh a\" },\n\t\t\"daily\": { primary: \"MMM d\", secondary: \"d\" },\n\t\t\"weekly\": { primary: \"eee, MMM d\", secondary: \"eee\" },\n\t\t\"monthly\": { primary: \"MMM yyyy\", secondary: \"MMM\" },\n\t\t\"quarterly\": { primary: \"QQQ ''yy\", secondary: \"QQQ\" },\n\t\t\"yearly\": { primary: \"yyyy\", secondary: \"yyyy\" }\n\t}\n};\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},\n\tcolor: {\n\t\tscale: null\n\t}\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\ttooltip: axisChartTooltip\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\ttooltip: barChartTooltip,\n} as BarChartOptions);\n\n/**\n * options specific to simple bar charts\n */\nconst simpleBarChart: BarChartOptions = Tools.merge({}, baseBarChart, {\n\n} as BarChartOptions);\n\n/**\n * options specific to simple bar charts\n */\nconst groupedBarChart: BarChartOptions = Tools.merge({}, baseBarChart, {\n\n} as BarChartOptions);\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 line charts\n */\nconst lineChart: LineChartOptions = Tools.merge({}, axisChart, {\n\tpoints: {\n\t\t// default point radius to 3\n\t\tradius: 3,\n\t\tfilled: false\n\t}\n} as LineChartOptions);\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}\n} as ScatterChartOptions);\n\n/**\n * options specific to bubble charts\n */\nconst bubbleChart: BubbleChartOptions = Tools.merge({}, axisChart, {\n\tbubble: {\n\t\tradiusMapsTo: \"radius\",\n\t\tradiusRange: (chartSize, data) => {\n\t\t\tconst smallerChartDimension = Math.min(chartSize.width, chartSize.height);\n\t\t\treturn [\n\t\t\t\tsmallerChartDimension * 3 / 400,\n\t\t\t\tsmallerChartDimension * 25 / 400\n\t\t\t];\n\t\t},\n\t\tfillOpacity: 0.2\n\t}\n} as BubbleChartOptions);\n\n/**\n * options specific to pie charts\n */\nconst pieChart: PieChartOptions = Tools.merge({}, chart, {\n\tpie: {\n\t\tradiusOffset: -15,\n\t\tinnerRadius: 2,\n\t\tpadAngle: 0.007,\n\t\thoverArc: {\n\t\t\touterRadiusOffset: 3\n\t\t},\n\t\txOffset: 30,\n\t\tyOffset: 20,\n\t\tyOffsetCallout: 10,\n\t\tcallout: {\n\t\t\tminSliceDegree: 5,\n\t\t\toffsetX: 15,\n\t\t\toffsetY: 12,\n\t\t\thorizontalLineLength: 8,\n\t\t\ttextMargin: 2\n\t\t},\n\t\tlabels: {\n\t\t\tformatter: null\n\t\t}\n\t}\n} as PieChartOptions);\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 => Math.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}\n} as DonutChartOptions);\n\nexport const options = {\n\tchart,\n\taxisChart,\n\tsimpleBarChart,\n\tgroupedBarChart,\n\tstackedBarChart,\n\tbubbleChart,\n\tlineChart,\n\tscatterChart,\n\tpieChart,\n\tdonutChart\n};\n\n/**\n * Options for line behaviour\n */\nexport const lines = {\n\topacity: {\n\t\tunselected: 0.3,\n\t\tselected: 1\n\t}\n};\n\n/**\n * Base transition configuration\n */\nexport const transitions = {\n\tdefault: {\n\t\tduration: 300\n\t},\n\tpie_slice_mouseover: {\n\t\tduration: 100\n\t},\n\tpie_chart_titles: {\n\t\tduration: 375\n\t},\n\tgraph_element_mouseover_fill_update: {\n\t\tduration: 100\n\t},\n\tgraph_element_mouseout_fill_update: {\n\t\tduration: 100\n\t}\n};\n\nexport const axis = {\n\tticks: {\n\t\tnumber: 7,\n\t\trotateIfSmallerThan: 30\n\t},\n\tpaddingRatio: 0.1\n};\n\nexport const spacers = {\n\tdefault: {\n\t\tsize: 24\n\t}\n};\n\nexport const tickSpaceRatioVertical = 2.5;\nexport const tickSpaceRatioHorizontal = 3.5;\n"]}
@@ -1,57 +1,50 @@
1
1
  export declare const groupedBarData: {
2
- labels: string[];
3
- datasets: {
4
- label: string;
5
- data: number[];
6
- }[];
7
- };
2
+ group: string;
3
+ key: string;
4
+ value: number;
5
+ }[];
8
6
  export declare const groupedBarOptions: {
9
7
  title: string;
10
8
  axes: {
11
9
  left: {
12
- primary: boolean;
10
+ mapsTo: string;
13
11
  };
14
12
  bottom: {
15
13
  scaleType: string;
16
- secondary: boolean;
14
+ mapsTo: string;
17
15
  };
18
16
  };
19
17
  };
20
18
  export declare const groupedHorizontalBarData: {
21
- labels: string[];
22
- datasets: {
23
- label: string;
24
- data: number[];
25
- }[];
26
- };
19
+ group: string;
20
+ key: string;
21
+ value: number;
22
+ }[];
27
23
  export declare const groupedHorizontalBarOptions: {
28
24
  title: string;
29
25
  axes: {
30
26
  left: {
31
27
  scaleType: string;
32
- primary: boolean;
28
+ mapsTo: string;
33
29
  };
34
30
  bottom: {
35
- secondary: boolean;
31
+ mapsTo: string;
36
32
  };
37
33
  };
38
34
  };
39
35
  export declare const simpleBarData: {
40
- labels: string[];
41
- datasets: {
42
- label: string;
43
- data: number[];
44
- }[];
45
- };
36
+ group: string;
37
+ value: number;
38
+ }[];
46
39
  export declare const simpleBarOptions: {
47
40
  title: string;
48
41
  axes: {
49
42
  left: {
50
- primary: boolean;
43
+ mapsTo: string;
51
44
  };
52
45
  bottom: {
46
+ mapsTo: string;
53
47
  scaleType: string;
54
- secondary: boolean;
55
48
  };
56
49
  };
57
50
  };
@@ -59,53 +52,45 @@ export declare const simpleBarFixedDomainOptions: {
59
52
  title: string;
60
53
  axes: {
61
54
  left: {
62
- primary: boolean;
55
+ mapsTo: string;
63
56
  domain: number[];
64
57
  };
65
58
  bottom: {
66
59
  scaleType: string;
67
- secondary: boolean;
60
+ mapsTo: string;
68
61
  };
69
62
  };
70
63
  };
71
64
  export declare const simpleHorizontalBarData: {
72
- labels: string[];
73
- datasets: {
74
- label: string;
75
- data: number[];
76
- }[];
77
- };
65
+ group: string;
66
+ value: number;
67
+ }[];
78
68
  export declare const simpleHorizontalBarOptions: {
79
69
  title: string;
80
70
  axes: {
81
71
  left: {
82
- primary: boolean;
72
+ mapsTo: string;
83
73
  scaleType: string;
84
74
  };
85
75
  bottom: {
86
- secondary: boolean;
76
+ mapsTo: string;
87
77
  };
88
78
  };
89
79
  };
90
80
  export declare const simpleBarTimeSeriesData: {
91
- labels: string[];
92
- datasets: {
93
- label: string;
94
- data: {
95
- date: Date;
96
- value: number;
97
- }[];
98
- }[];
99
- };
81
+ group: string;
82
+ date: Date;
83
+ value: number;
84
+ }[];
100
85
  export declare const simpleBarTimeSeriesOptions: {
101
86
  title: string;
102
87
  axes: {
103
88
  left: {
104
- primary: boolean;
89
+ mapsTo: string;
105
90
  };
106
91
  bottom: {
92
+ mapsTo: string;
107
93
  scaleType: string;
108
- secondary: boolean;
109
94
  };
110
95
  };
111
96
  timeScale: {
@@ -116,84 +101,68 @@ export declare const simpleHorizontalBarTimeSeriesOptions: {
116
101
  title: string;
117
102
  axes: {
118
103
  left: {
104
+ mapsTo: string;
119
105
  scaleType: string;
120
- primary: boolean;
121
106
  };
122
107
  bottom: {
123
- secondary: boolean;
108
+ mapsTo: string;
124
109
  };
125
110
  };
126
111
  };
127
112
  export declare const simpleHorizontalBarTimeSeriesData: {
128
- labels: string[];
129
- datasets: {
130
- label: string;
131
- data: {
132
- date: Date;
133
- value: number;
134
- }[];
135
- }[];
136
- };
113
+ group: string;
114
+ date: Date;
115
+ value: number;
116
+ }[];
137
117
  export declare const stackedBarData: {
138
- labels: string[];
139
- datasets: {
140
- label: string;
141
- data: number[];
142
- }[];
143
- };
118
+ group: string;
119
+ key: string;
120
+ value: number;
121
+ }[];
144
122
  export declare const stackedBarOptions: {
145
123
  title: string;
146
124
  axes: {
147
125
  left: {
148
- primary: boolean;
126
+ mapsTo: string;
149
127
  stacked: boolean;
150
128
  };
151
129
  bottom: {
130
+ mapsTo: string;
152
131
  scaleType: string;
153
- secondary: boolean;
154
132
  };
155
133
  };
156
134
  };
157
135
  export declare const stackedHorizontalBarData: {
158
- labels: string[];
159
- datasets: {
160
- label: string;
161
- data: number[];
162
- }[];
163
- };
136
+ group: string;
137
+ key: string;
138
+ value: number;
139
+ }[];
164
140
  export declare const stackedHorizontalBarOptions: {
165
141
  title: string;
166
142
  axes: {
167
143
  left: {
168
144
  scaleType: string;
169
- primary: boolean;
170
145
  };
171
146
  bottom: {
172
147
  stacked: boolean;
173
- secondary: boolean;
174
148
  };
175
149
  };
176
150
  };
177
151
  export declare const stackedBarTimeSeriesData: {
178
- labels: string[];
179
- datasets: {
180
- label: string;
181
- data: {
182
- date: Date;
183
- value: number;
184
- }[];
185
- }[];
186
- };
152
+ group: string;
153
+ date: Date;
154
+ value: number;
155
+ }[];
187
156
  export declare const stackedBarTimeSeriesOptions: {
188
157
  title: string;
189
158
  axes: {
190
159
  left: {
191
- primary: boolean;
160
+ mapsTo: string;
192
161
  stacked: boolean;
193
162
  };
194
163
  bottom: {
164
+ mapsTo: string;
195
165
  scaleType: string;
196
- secondary: boolean;
197
166
  };
198
167
  };
199
168
  };
@@ -201,22 +170,15 @@ export declare const stackedHorizontalBarTimeSeriesOptions: {
201
170
  title: string;
202
171
  axes: {
203
172
  left: {
204
- primary: boolean;
205
173
  scaleType: string;
206
174
  };
207
175
  bottom: {
208
176
  stacked: boolean;
209
- secondary: boolean;
210
177
  };
211
178
  };
212
179
  };
213
180
  export declare const stackedHorizontalBarTimeSeriesData: {
214
- labels: string[];
215
- datasets: {
216
- label: string;
217
- data: {
218
- date: Date;
219
- value: number;
220
- }[];
221
- }[];
222
- };
181
+ group: string;
182
+ date: Date;
183
+ value: number;
184
+ }[];