@carbon/charts 0.11.11 → 0.12.1
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 +61 -0
- package/README.md +5 -0
- package/bar-chart.js +6 -12
- package/bar-chart.js.map +1 -1
- package/base-chart.d.ts +6 -7
- package/base-chart.js +52 -120
- package/base-chart.js.map +1 -1
- package/components/index.d.ts +1 -0
- package/components/index.js +2 -0
- package/components/index.js.map +1 -0
- package/components/overlay.d.ts +9 -0
- package/components/overlay.js +28 -0
- package/components/overlay.js.map +1 -0
- package/components/tooltip.d.ts +13 -0
- package/components/tooltip.js +110 -0
- package/components/tooltip.js.map +1 -0
- package/configuration.d.ts +28 -7
- package/configuration.js +20 -16
- package/configuration.js.map +1 -1
- package/index.d.ts +3 -2
- package/index.js +4 -3
- package/index.js.map +1 -1
- package/index.umd.js +1 -1
- package/index.umd.js.map +1 -1
- package/package.json +9 -9
- package/pie-chart.d.ts +1 -1
- package/pie-chart.js +15 -39
- package/pie-chart.js.map +1 -1
- package/scatter-chart.d.ts +1 -0
- package/scatter-chart.js +20 -14
- package/scatter-chart.js.map +1 -1
- package/services/colorPalettes.d.ts +4 -0
- package/services/colorPalettes.js +30 -0
- package/services/colorPalettes.js.map +1 -0
- package/services/colors.d.ts +9 -0
- package/services/colors.js +11 -0
- package/services/colors.js.map +1 -0
- package/stacked-bar-chart.js +5 -12
- package/stacked-bar-chart.js.map +1 -1
- package/style.css +7 -5
- package/style.scss +5 -3
package/configuration.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Tools } from "./tools";
|
|
2
|
+
import * as colorPalettes from "./services/colorPalettes";
|
|
2
3
|
/*
|
|
3
4
|
**********************
|
|
4
5
|
* chart config enums *
|
|
@@ -39,19 +40,21 @@ export var ThresholdTheme;
|
|
|
39
40
|
var baseOptions = {
|
|
40
41
|
legendClickable: true,
|
|
41
42
|
containerResizable: true,
|
|
42
|
-
colors:
|
|
43
|
-
"#00a68f",
|
|
44
|
-
"#3b1a40",
|
|
45
|
-
"#473793",
|
|
46
|
-
"#3c6df0",
|
|
47
|
-
"#56D2BB"
|
|
48
|
-
],
|
|
43
|
+
colors: colorPalettes.DEFAULT,
|
|
49
44
|
tooltip: {
|
|
50
45
|
size: TooltipSize.FULL,
|
|
51
|
-
formatter: null
|
|
46
|
+
formatter: null,
|
|
47
|
+
targetsToSkip: ["rect", "circle", "path"]
|
|
52
48
|
},
|
|
53
|
-
|
|
54
|
-
|
|
49
|
+
overlay: {
|
|
50
|
+
types: {
|
|
51
|
+
loading: "loading",
|
|
52
|
+
noData: "noData"
|
|
53
|
+
},
|
|
54
|
+
innerHTML: {
|
|
55
|
+
loading: "\n\t\t\t<div class=\"ccharts-overlay-content\">\n\t\t\t\t<div data-loading class=\"bx--loading bx--loading--small\">\n\t\t\t\t\t<svg class=\"bx--loading__svg\" viewBox=\"-75 -75 150 150\">\n\t\t\t\t\t\t<title>Loading</title>\n\t\t\t\t\t\t<circle cx=\"0\" cy=\"0\" r=\"37.5\" />\n\t\t\t\t\t</svg>\n\t\t\t\t</div>\n\n\t\t\t\t<p>Loading</p>\n\t\t\t</div>\n\t\t\t",
|
|
56
|
+
noData: "\n\t\t\t<div class=\"ccharts-overlay-content\">\n\t\t\t\tNo data available\n\t\t\t</div>\n\t\t\t"
|
|
57
|
+
}
|
|
55
58
|
}
|
|
56
59
|
};
|
|
57
60
|
/**
|
|
@@ -83,8 +86,8 @@ var axisOptions = Tools.merge({}, baseOptions, {
|
|
|
83
86
|
*/
|
|
84
87
|
var lineOptions = Tools.merge({}, axisOptions, {
|
|
85
88
|
points: {
|
|
86
|
-
// default point radius to
|
|
87
|
-
radius:
|
|
89
|
+
// default point radius to 3
|
|
90
|
+
radius: 3
|
|
88
91
|
}
|
|
89
92
|
});
|
|
90
93
|
/**
|
|
@@ -93,7 +96,8 @@ var lineOptions = Tools.merge({}, axisOptions, {
|
|
|
93
96
|
var scatterOptions = Tools.merge({}, axisOptions, {
|
|
94
97
|
points: {
|
|
95
98
|
// default point radius to 4
|
|
96
|
-
radius: 4
|
|
99
|
+
radius: 4,
|
|
100
|
+
fillOpacity: 0.3
|
|
97
101
|
}
|
|
98
102
|
});
|
|
99
103
|
/**
|
|
@@ -159,7 +163,7 @@ export var charts = {
|
|
|
159
163
|
outline: "grey"
|
|
160
164
|
},
|
|
161
165
|
points: {
|
|
162
|
-
radius:
|
|
166
|
+
radius: 3
|
|
163
167
|
},
|
|
164
168
|
patternFills: {
|
|
165
169
|
width: 20,
|
|
@@ -255,7 +259,7 @@ export var bars = {
|
|
|
255
259
|
export var lines = {
|
|
256
260
|
points: {
|
|
257
261
|
strokeWidth: 4,
|
|
258
|
-
minNonFilledRadius:
|
|
262
|
+
minNonFilledRadius: 3,
|
|
259
263
|
mouseover: {
|
|
260
264
|
strokeWidth: 4,
|
|
261
265
|
strokeOpacity: 0.5
|
|
@@ -348,7 +352,7 @@ export var tooltip = {
|
|
|
348
352
|
magicTop1: 21,
|
|
349
353
|
magicTop2: 22,
|
|
350
354
|
magicLeft1: 11,
|
|
351
|
-
magicLeft2:
|
|
355
|
+
magicLeft2: 10,
|
|
352
356
|
fadeIn: {
|
|
353
357
|
duration: 250
|
|
354
358
|
},
|
package/configuration.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configuration.js","sourceRoot":"","sources":["src/configuration.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC;;;;GAIG;AAEH;;GAEG;AACH,MAAM,CAAN,IAAY,SAOX;AAPD,WAAY,SAAS;IACpB,wBAAW,CAAA;IACX,0BAAa,CAAA;IACb,gCAAmB,CAAA;IACnB,wBAAW,CAAA;IACX,4BAAe,CAAA;IACf,4BAAe,CAAA;AAChB,CAAC,EAPW,SAAS,KAAT,SAAS,QAOpB;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,WAGX;AAHD,WAAY,WAAW;IAC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AM,SAAS,GAAG;IACxB,QAAQ,EAAE,eAAe;IACzB,SAAS,EAAE,cAAc;IACzB,YAAY,EAAE,mBAAmB;IACjC,OAAO,EAAE,mBAAmB;IAC5B,UAAU,EAAE,eAAe;IAC3B,GAAG,EAAE;QACJ,KAAK,EAAE,MAAM;KACb;CACD,CAAC","sourcesContent":["import { ScaleBand, ScaleLinear } from \"d3-scale\";\nimport { Tools } from \"./tools\";\n\n/*\n **********************\n * chart config enums *\n **********************\n */\n\n/**\n * enum of all supported charts\n */\nexport enum ChartType {\n\tBAR = \"bar\",\n\tLINE = \"line\",\n\tSCATTER = \"scatter\",\n\tPIE = \"pie\",\n\tDONUT = \"donut\",\n\tCOMBO = \"combo\"\n}\n\n/**\n * enum of all possible tooltip sizes\n */\nexport enum TooltipSize {\n\tCOMPACT = \"compact\",\n\tFULL = \"\"\n}\n\n/**\n * enum of all possible threshold themes\n */\nexport enum ThresholdTheme {\n\tSUCCESS = \"success\",\n\tERROR = \"error\",\n\tWARNING = \"warning\"\n}\n\n/*\n *****************************\n * User configurable options *\n *****************************\n */\n\n/**\n * Base chart options common to any chart\n */\nexport interface BaseChartOptions {\n\t/**\n\t * Internal property to track what type of chart should be instantiated\n\t */\n\ttype?: ChartType;\n\t/**\n\t * boolean to enable accessibility mode\n\t */\n\taccessibility?: boolean;\n\t/**\n\t * boolean to disable animations (enabled by default)\n\t */\n\tanimations?: boolean;\n\t/**\n\t * boolean to enable/disable legend interactivity\n\t */\n\tlegendClickable?: boolean;\n\t/**\n\t * boolean to prevent the container from resizing\n\t */\n\tcontainerResizable?: boolean;\n\t/**\n\t * array of hex colors for the chart to render from\n\t */\n\tcolors: Array<string>;\n\t/**\n\t * tooltip configuration\n\t */\n\ttooltip?: {\n\t\t/**\n\t\t * specify the size of the tooltip\n\t\t */\n\t\tsize: TooltipSize;\n\t\t/**\n\t\t * a function to format the tooltip contents\n\t\t */\n\t\tformatter: Function;\n\t};\n\t/**\n\t * customize the loading overlay contents\n\t */\n\tloadingOverlay?: {\n\t\t/**\n\t\t * raw html to be injected into the loading container\n\t\t */\n\t\tinnerHTML: string;\n\t};\n\t/**\n\t * Optional function to generate the fill color based on datasetLabel, label, and/or value\n\t */\n\tgetFillColor?: (datasetLabel: any, label?: any, value?: any) => string;\n\t/**\n\t * Optional function to generate the stroke color based on datasetLabel, label, and/or value\n\t */\n\tgetStrokeColor?: (datasetLabel: any, label?: any, value?: any) => string;\n\t/**\n\t * Optionally specify a width for the chart\n\t */\n\twidth?: number;\n\t/**\n\t * Optionally specify a height for the chart\n\t */\n\theight?: number;\n\t/**\n\t * Internal property to track keys in the legend\n\t */\n\tkeys?: Object;\n}\n/**\n * Base chart options common to any chart\n */\nconst baseOptions: BaseChartOptions = {\n\tlegendClickable: true,\n\tcontainerResizable: true,\n\tcolors: [\n\t\t\"#00a68f\",\n\t\t\"#3b1a40\",\n\t\t\"#473793\",\n\t\t\"#3c6df0\",\n\t\t\"#56D2BB\"\n\t],\n\ttooltip: {\n\t\tsize: TooltipSize.FULL,\n\t\tformatter: null\n\t},\n\tloadingOverlay: {\n\t\tinnerHTML: `\n\t\t<div class=\"loading-overlay-content\">\n\t\t <div data-loading class=\"bx--loading bx--loading--small\">\n\t\t\t<svg class=\"bx--loading__svg\" viewBox=\"-75 -75 150 150\">\n\t\t\t\t<title>Loading</title>\n\t\t\t\t<circle cx=\"0\" cy=\"0\" r=\"37.5\" />\n\t\t\t</svg>\n\t\t </div>\n\n\t\t <p>Loading</p>\n\t\t</div>\n\t\t`\n\t}\n};\n\n/**\n * Options specific to pie charts\n */\nexport type PieChartOptions = BaseChartOptions;\n/**\n * Options specific to pie charts\n */\nconst pieOptions: PieChartOptions = Tools.merge({}, baseOptions);\n\n/**\n * Options specific to donut charts\n */\nexport interface DonutChartOptions extends PieChartOptions {\n\tcenter?: {\n\t\tlabel: string;\n\t\tnumber: string;\n\t};\n\tcenterLabel?: string;\n\tcenterNumber?: string;\n}\n\nconst donutOptions: DonutChartOptions = Tools.merge({}, baseOptions);\n\n/**\n * represents a threshold visually bringing attention to specific values/issues\n */\nexport interface Threshold {\n\t/**\n\t * range of values the threshold should apply to\n\t */\n\trange: Array<number>;\n\t/**\n\t * theme of the threshold\n\t */\n\ttheme: ThresholdTheme;\n}\n\n/**\n * options to configure a scale. not all options are used by all scales\n */\nexport interface ScaleOptions {\n\t/**\n\t * optional title for the scales\n\t */\n\ttitle?: string;\n\t/**\n\t * function to adjust the min value\n\t */\n\tmaxValueAdjuster?: Function;\n\t/**\n\t * function to adjust the max value\n\t */\n\tminValueAdjuster?: Function;\n\t/**\n\t * function to format the ticks\n\t */\n\tformatter?: Function;\n\t/**\n\t * tick configuration\n\t */\n\tticks?: {\n\t\t/**\n\t\t * maximum ... number of ticks?\n\t\t */\n\t\tmax: number;\n\t\t/**\n\t\t * minumum ... number of ticks?\n\t\t */\n\t\tmin: number;\n\t};\n\t/**\n\t * configuration for the thresholds\n\t */\n\tthresholds?: Array<Threshold>;\n}\n\n/**\n * options to configure a Y (vertical) scale\n */\nexport interface YScaleOptions extends ScaleOptions {\n\t/**\n\t * boolean to indicate whether data should be stacked\n\t */\n\tstacked?: boolean;\n}\n\n/**\n * options for the x, y, and y2 scales/axis\n */\nexport interface Scales {\n\tx: ScaleOptions;\n\ty: YScaleOptions;\n\ty2?: YScaleOptions;\n}\n\nexport interface Axis {\n\tx: ScaleBand<any>;\n\ty: ScaleLinear<any, any>;\n\ty2: ScaleLinear<any, any>;\n}\n\n/**\n * Options common to any chart with an axis\n */\nexport interface AxisChartOptions extends BaseChartOptions {\n\t/**\n\t * scale configuration\n\t */\n\tscales?: Scales;\n\taxis?: Axis;\n}\n/**\n * Options common to any chart with an axis\n */\nconst axisOptions: AxisChartOptions = Tools.merge({}, baseOptions, {\n\tscales: {\n\t\tx: {\n\t\t\tdomain: null,\n\t\t\tticks: 5\n\t\t},\n\t\ty: {\n\t\t\tdomain: null,\n\t\t\tticks: 5\n\t\t},\n\t\tySecondary: {\n\t\t\tdomain: null,\n\t\t\tticks: 10\n\t\t}\n\t}\n});\n\n/**\n * options specific to line charts\n */\nexport interface LineChartOptions extends AxisChartOptions {\n\t/**\n\t * options for the curve of the line\n\t */\n\tcurve?: string | {\n\t\tname: string;\n\t};\n\t/**\n\t * options for the line 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};\n}\n/**\n * options specific to line charts\n */\nconst lineOptions: LineChartOptions = Tools.merge({}, axisOptions, {\n\tpoints: {\n\t\t// default point radius to 4\n\t\tradius: 4\n\t}\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};\n}\n/**\n * options specific to line charts\n */\nconst scatterOptions: ScatterChartOptions = Tools.merge({}, axisOptions, {\n\tpoints: {\n\t\t// default point radius to 4\n\t\tradius: 4\n\t}\n});\n\n/**\n * options specific to bar charts\n */\nexport interface BarChartOptions extends AxisChartOptions {\n\t/**\n\t * options for all bars\n\t */\n\tbars?: {\n\t\t/**\n\t\t * constrains the bars to a maximum width\n\t\t */\n\t\tmaxWidth: number;\n\t};\n}\n/**\n * options specific to bar charts\n */\nconst barOptions: BarChartOptions = Tools.merge({}, axisOptions);\n\n/**\n * options specific to bar charts\n */\nexport type StackedBarChartOptions = BarChartOptions;\n/**\n * options specific to bar charts\n */\nconst stackedBarOptions: StackedBarChartOptions = Tools.merge({}, barOptions);\n\n/**\n * Options specific to combo charts.\n *\n * This interface also extends all other AxisChartOption interfaces as the single config is shared across all charts in a combo\n */\nexport interface ComboChartOptions extends AxisChartOptions, BarChartOptions, LineChartOptions, ScatterChartOptions { }\n/**\n * Options specific to combo charts.\n *\n */\nconst comboOptions: ComboChartOptions = Tools.merge({}, axisOptions, barOptions, lineOptions, scatterOptions);\n\n/**\n * Configuration passed to the chart.\n *\n * Includes options and data\n */\nexport interface ChartConfig<T extends BaseChartOptions> {\n\toptions: T;\n\tdata: ChartData | Promise<ChartData>;\n}\n\nexport const options = {\n\tBASE: baseOptions,\n\tAXIS: axisOptions,\n\tLINE: lineOptions,\n\tSCATTER: scatterOptions,\n\tBAR: barOptions,\n\tSTACKED_BAR: stackedBarOptions,\n\tCOMBO: comboOptions,\n\tPIE: pieOptions,\n\tDONUT: donutOptions\n};\n\nexport interface DataSet {\n\t/**\n\t * Label for the dataset\n\t */\n\tlabel: string;\n\t/**\n\t * Array of hex background colors\n\t */\n\tbackgroundColors: Array<string>;\n\t/**\n\t * Array of data values\n\t */\n\tdata: Array<any>;\n\t/**\n\t * chartType - only used with combo charts\n\t */\n\tchartType?: ChartType;\n}\n\nexport interface ChartData {\n\t/**\n\t * Labels for the x (horizontal) axis. Should match the number of items in each dataset data array\n\t */\n\tlabels: Array<string>;\n\t/**\n\t * Array of datasets to display in the chart\n\t */\n\tdatasets: Array<DataSet>;\n}\n\n/*\n ********************************************\n * Internal (non-user configurable) options *\n ********************************************\n */\n\n/**\n * General chart options. margins, min/max widths, etc\n */\nexport const charts = {\n\tmargin: {\n\t\ttop: 20,\n\t\tbottom: 60,\n\t\tleft: 60,\n\t\tright: 20,\n\t\tbar: {\n\t\t\ttop: 0,\n\t\t\tright: -40,\n\t\t\tbottom: 50,\n\t\t\tleft: 40\n\t\t},\n\t\tline: {\n\t\t\ttop: 0,\n\t\t\tright: -40,\n\t\t\tbottom: 50,\n\t\t\tleft: 40\n\t\t}\n\t},\n\tresetOpacity: {\n\t\topacity: 1,\n\t\tcircle: {\n\t\t\tfill: \"white\"\n\t\t},\n\t\toutline: \"grey\"\n\t},\n\treduceOpacity: {\n\t\topacity: 0.25,\n\t\toutline: \"grey\"\n\t},\n\tpoints: {\n\t\tradius: 4\n\t},\n\tpatternFills: {\n\t\twidth: 20,\n\t\theight: 20\n\t},\n\tminWidth: 150,\n\twidthBreak: 600,\n\tmarginForLegendTop: 40,\n\tmagicRatio: 0.7,\n\tmagicMoreForY2Axis: 70,\n\taxisCharts: {\n\t\tminWidth: 100,\n\t\tminHeight: 200\n\t}\n};\n\n/**\n * Options to render scales to spec\n */\nexport const scales = {\n\tmaxWidthOfAxisLabel: 175,\n\tmaxNumOfAxisLabelLetters: 60,\n\tyAxisAngle: -90,\n\txAxisAngle: -45,\n\tdomain: {\n\t\tcolor: \"#959595\",\n\t\tstrokeWidth: 2\n\t},\n\tdx: \"-1em\",\n\tlabel: {\n\t\tdy: \"1em\"\n\t},\n\ttick: {\n\t\tdy: \"0.5em\",\n\t\twidthAdditionY: 25,\n\t\twidthAdditionY2: 15,\n\t\theightAddition: 16,\n\t\tlineHeight: 1.1\n\t},\n\tmagicDy1: \"0.71em\",\n\tmagicY1: 9,\n\tmagicX1: -4,\n\ty: {\n\t\tnumberOfTicks: 5,\n\t\tthresholds: {\n\t\t\tcolors: {\n\t\t\t\t\"danger\": \"rgba(255, 39, 41, 0.1)\",\n\t\t\t\t\"success\": \"rgba(0, 212, 117, 0.1)\",\n\t\t\t\t\"warning\": \"rgba(255, 214, 0, 0.1)\"\n\n\t\t\t}\n\t\t}\n\t},\n\tx: {\n\t\tnumberOfTicks: 5,\n\t\tpadding: 0.2\n\t},\n\ty2: {\n\t\tnumberOfTicks: 5\n\t}\n};\n\n/**\n * Grid options\n */\nexport const grid = {\n\tstrokeColor: \"#ECEEEF\"\n};\n\n/**\n * Options for bar behaviour\n */\nexport const bars = {\n\tmouseover: {\n\t\tstrokeWidth: 4,\n\t\tstrokeOpacity: 0.5\n\t},\n\tmouseout: {\n\t\tstrokeWidth: 0,\n\t\tstrokeWidthAccessible: 2,\n\t\tstrokeOpacity: 1\n\t},\n\tdefault: {\n\t\tstrokeWidth: 2\n\t},\n\tspacing: {\n\t\tbars: 0.2,\n\t\tdatasets: 0.25\n\t},\n\tbars: {\n\t\tmaxWidth: null\n\t}\n};\n\n/**\n * Options for line behaviour\n */\nexport const lines = {\n\tpoints: {\n\t\tstrokeWidth: 4,\n\t\tminNonFilledRadius: 4,\n\t\tmouseover: {\n\t\t\tstrokeWidth: 4,\n\t\t\tstrokeOpacity: 0.5\n\t\t},\n\t\tmouseout: {\n\t\t\tstrokeWidth: 0,\n\t\t\tstrokeWidthAccessible: 2,\n\t\t\tstrokeOpacity: 1\n\t\t}\n\t}\n};\n\n/**\n * Options for pie behaviour\n */\nexport const pie = {\n\tmaxWidth: 516.6,\n\tmouseover: {\n\t\tstrokeWidth: 6,\n\t\tstrokeOpacity: 0.5\n\t},\n\tmouseout: {\n\t\tstrokeWidth: 0,\n\t\tstrokeOpacity: 1\n\t},\n\tsliceLimit: 6,\n\tlabel: {\n\t\tdy: \".32em\",\n\t\tmargin: 8,\n\t\tother: \"Other\"\n\t},\n\tdefault: {\n\t\tstrokeWidth: 2\n\t}\n};\n\n/**\n * Options for donut behaviour\n */\nexport const donut = {\n\tcenterText: {\n\t\ttitle: {\n\t\t\ty: 22\n\t\t},\n\t\tbreakpoint: 175,\n\t\tmagicScaleRatio: 2.5,\n\t\tnumberFontSize: 24,\n\t\ttitleFontSize: 15\n\t}\n};\n\n/**\n * Legend configuration\n */\nexport const legend = {\n\tcountBreak: 4,\n\tfontSize: 12,\n\twrapperHeight: \"40px\",\n\twidthTolerance: 15,\n\thoverShadowSize: \"3px\",\n\thoverShadowTransparency: 0.2,\n\tmargin: {\n\t\ttop: 19\n\t},\n\tactive: {\n\t\tborderColor: false,\n\t\tborderStyle: false,\n\t\tborderWidth: false\n\t},\n\tinactive: {\n\t\tbackgroundColor: \"white\",\n\t\tborderStyle: \"solid\",\n\t\tborderWidth: \"2px\"\n\t},\n\titems: {\n\t\tstatus: {\n\t\t\tACTIVE: 1,\n\t\t\tDISABLED: 0\n\t\t},\n\t},\n\tbasedOn: {\n\t\tSERIES: \"series\",\n\t\tLABELS: \"labels\"\n\t}\n};\n\n/**\n * Tooltip options\n */\nexport const tooltip = {\n\twidth: 200,\n\tarrowWidth: 10,\n\tmagicXPoint2: 20,\n\tmagicTop1: 21,\n\tmagicTop2: 22,\n\tmagicLeft1: 11,\n\tmagicLeft2: 12,\n\tfadeIn: {\n\t\tduration: 250\n\t},\n\tfadeOut: {\n\t\tduration: 250\n\t},\n\tsize: {\n\t\tCOMPACT: \"compact\"\n\t}\n};\n\n/**\n * Base transition configuration\n */\nexport const transitions = {\n\tdefault: {\n\t\tduration: 750\n\t}\n};\n\n/**\n * Selectors to standardize querying parts of the chart\n */\nexport const selectors = {\n\tOUTERSVG: \"svg.chart-svg\",\n\tINNERWRAP: \"g.inner-wrap\",\n\tCHARTWRAPPER: \"div.chart-wrapper\",\n\tTOOLTIP: \"div.chart-tooltip\",\n\tLEGEND_BTN: \"li.legend-btn\",\n\tpie: {\n\t\tSLICE: \"path\"\n\t}\n};\n"]}
|
|
1
|
+
{"version":3,"file":"configuration.js","sourceRoot":"","sources":["src/configuration.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,KAAK,aAAa,MAAM,0BAA0B,CAAC;AAE1D;;;;GAIG;AAEH;;GAEG;AACH,MAAM,CAAN,IAAY,SAOX;AAPD,WAAY,SAAS;IACpB,wBAAW,CAAA;IACX,0BAAa,CAAA;IACb,gCAAmB,CAAA;IACnB,wBAAW,CAAA;IACX,4BAAe,CAAA;IACf,4BAAe,CAAA;AAChB,CAAC,EAPW,SAAS,KAAT,SAAS,QAOpB;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,WAGX;AAHD,WAAY,WAAW;IACtB,kCAAmB,CAAA;IACnB,wBAAS,CAAA;AACV,CAAC,EAHW,WAAW,KAAX,WAAW,QAGtB;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,cAIX;AAJD,WAAY,cAAc;IACzB,qCAAmB,CAAA;IACnB,iCAAe,CAAA;IACf,qCAAmB,CAAA;AACpB,CAAC,EAJW,cAAc,KAAd,cAAc,QAIzB;AAkGD;;GAEG;AACH,IAAM,WAAW,GAAqB;IACrC,eAAe,EAAE,IAAI;IACrB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AC3B,GAAG,EAAE;QACJ,KAAK,EAAE,MAAM;KACb;CACD,CAAC","sourcesContent":["import { ScaleBand, ScaleLinear } from \"d3-scale\";\nimport { Tools } from \"./tools\";\nimport * as colorPalettes from \"./services/colorPalettes\";\n\n/*\n **********************\n * chart config enums *\n **********************\n */\n\n/**\n * enum of all supported charts\n */\nexport enum ChartType {\n\tBAR = \"bar\",\n\tLINE = \"line\",\n\tSCATTER = \"scatter\",\n\tPIE = \"pie\",\n\tDONUT = \"donut\",\n\tCOMBO = \"combo\"\n}\n\n/**\n * enum of all possible tooltip sizes\n */\nexport enum TooltipSize {\n\tCOMPACT = \"compact\",\n\tFULL = \"\"\n}\n\n/**\n * enum of all possible threshold themes\n */\nexport enum ThresholdTheme {\n\tSUCCESS = \"success\",\n\tERROR = \"error\",\n\tWARNING = \"warning\"\n}\n\n/*\n *****************************\n * User configurable options *\n *****************************\n */\n/**\n * customize the overlay contents\n */\nexport interface ChartOverlayOptions {\n\t/**\n\t * types of overlay states\n\t */\n\ttypes: {\n\t\tloading: string;\n\t\tnoData: string;\n\t};\n\t/**\n\t * raw html to be injected into the overlay container\n\t */\n\tinnerHTML: {\n\t\tloading: string;\n\t\tnoData: string;\n\t};\n}\n\n/**\n * Base chart options common to any chart\n */\nexport interface BaseChartOptions {\n\t/**\n\t * Internal property to track what type of chart should be instantiated\n\t */\n\ttype?: ChartType;\n\t/**\n\t * boolean to enable accessibility mode\n\t */\n\taccessibility?: boolean;\n\t/**\n\t * boolean to disable animations (enabled by default)\n\t */\n\tanimations?: boolean;\n\t/**\n\t * boolean to enable/disable legend interactivity\n\t */\n\tlegendClickable?: boolean;\n\t/**\n\t * boolean to prevent the container from resizing\n\t */\n\tcontainerResizable?: boolean;\n\t/**\n\t * array of hex colors for the chart to render from\n\t */\n\tcolors: Array<string>;\n\t/**\n\t * tooltip configuration\n\t */\n\ttooltip?: {\n\t\t/**\n\t\t * specify the size of the tooltip\n\t\t */\n\t\tsize: TooltipSize;\n\t\t/**\n\t\t * a function to format the tooltip contents\n\t\t */\n\t\tformatter: Function;\n\t\t/**\n\t\t * elements onto which a hover or click would not trigger the tooltip to hide\n\t\t */\n\t\ttargetsToSkip: Array<String>;\n\t\t/**\n\t\t * custom HTML content for tooltip provided by user\n\t\t */\n\t\tcustomHTML?: string;\n\t};\n\toverlay?: ChartOverlayOptions;\n\t/**\n\t * Optional function to generate the fill color based on datasetLabel, label, and/or value\n\t */\n\tgetFillColor?: (datasetLabel: any, label?: any, value?: any) => string;\n\t/**\n\t * Optional function to generate the stroke color based on datasetLabel, label, and/or value\n\t */\n\tgetStrokeColor?: (datasetLabel: any, label?: any, value?: any) => string;\n\t/**\n\t * Optionally specify a width for the chart\n\t */\n\twidth?: number;\n\t/**\n\t * Optionally specify a height for the chart\n\t */\n\theight?: number;\n\t/**\n\t * Internal property to track keys in the legend\n\t */\n\tkeys?: Object;\n}\n/**\n * Base chart options common to any chart\n */\nconst baseOptions: BaseChartOptions = {\n\tlegendClickable: true,\n\tcontainerResizable: true,\n\tcolors: colorPalettes.DEFAULT,\n\ttooltip: {\n\t\tsize: TooltipSize.FULL,\n\t\tformatter: null,\n\t\ttargetsToSkip: [\"rect\", \"circle\", \"path\"]\n\t},\n\toverlay: {\n\t\ttypes: {\n\t\t\tloading: \"loading\",\n\t\t\tnoData: \"noData\"\n\t\t},\n\t\tinnerHTML: {\n\t\t\tloading: `\n\t\t\t<div class=\"ccharts-overlay-content\">\n\t\t\t\t<div data-loading class=\"bx--loading bx--loading--small\">\n\t\t\t\t\t<svg class=\"bx--loading__svg\" viewBox=\"-75 -75 150 150\">\n\t\t\t\t\t\t<title>Loading</title>\n\t\t\t\t\t\t<circle cx=\"0\" cy=\"0\" r=\"37.5\" />\n\t\t\t\t\t</svg>\n\t\t\t\t</div>\n\n\t\t\t\t<p>Loading</p>\n\t\t\t</div>\n\t\t\t`,\n\t\t\tnoData: `\n\t\t\t<div class=\"ccharts-overlay-content\">\n\t\t\t\tNo data available\n\t\t\t</div>\n\t\t\t`\n\t\t}\n\t}\n};\n\n/**\n * Options specific to pie charts\n */\nexport type PieChartOptions = BaseChartOptions;\n/**\n * Options specific to pie charts\n */\nconst pieOptions: PieChartOptions = Tools.merge({}, baseOptions);\n\n/**\n * Options specific to donut charts\n */\nexport interface DonutChartOptions extends PieChartOptions {\n\tcenter?: {\n\t\tlabel: string;\n\t\tnumber: string;\n\t};\n\tcenterLabel?: string;\n\tcenterNumber?: string;\n}\n\nconst donutOptions: DonutChartOptions = Tools.merge({}, baseOptions);\n\n/**\n * represents a threshold visually bringing attention to specific values/issues\n */\nexport interface Threshold {\n\t/**\n\t * range of values the threshold should apply to\n\t */\n\trange: Array<number>;\n\t/**\n\t * theme of the threshold\n\t */\n\ttheme: ThresholdTheme;\n}\n\n/**\n * options to configure a scale. not all options are used by all scales\n */\nexport interface ScaleOptions {\n\t/**\n\t * optional title for the scales\n\t */\n\ttitle?: string;\n\t/**\n\t * function to adjust the min value\n\t */\n\tmaxValueAdjuster?: Function;\n\t/**\n\t * function to adjust the max value\n\t */\n\tminValueAdjuster?: Function;\n\t/**\n\t * function to format the ticks\n\t */\n\tformatter?: Function;\n\t/**\n\t * tick configuration\n\t */\n\tticks?: {\n\t\t/**\n\t\t * maximum ... number of ticks?\n\t\t */\n\t\tmax: number;\n\t\t/**\n\t\t * minumum ... number of ticks?\n\t\t */\n\t\tmin: number;\n\t};\n\t/**\n\t * configuration for the thresholds\n\t */\n\tthresholds?: Array<Threshold>;\n}\n\n/**\n * options to configure a Y (vertical) scale\n */\nexport interface YScaleOptions extends ScaleOptions {\n\t/**\n\t * boolean to indicate whether data should be stacked\n\t */\n\tstacked?: boolean;\n}\n\n/**\n * options for the x, y, and y2 scales/axis\n */\nexport interface Scales {\n\tx: ScaleOptions;\n\ty: YScaleOptions;\n\ty2?: YScaleOptions;\n}\n\nexport interface Axis {\n\tx: ScaleBand<any>;\n\ty: ScaleLinear<any, any>;\n\ty2: ScaleLinear<any, any>;\n}\n\n/**\n * Options common to any chart with an axis\n */\nexport interface AxisChartOptions extends BaseChartOptions {\n\t/**\n\t * scale configuration\n\t */\n\tscales?: Scales;\n\taxis?: Axis;\n}\n/**\n * Options common to any chart with an axis\n */\nconst axisOptions: AxisChartOptions = Tools.merge({}, baseOptions, {\n\tscales: {\n\t\tx: {\n\t\t\tdomain: null,\n\t\t\tticks: 5\n\t\t},\n\t\ty: {\n\t\t\tdomain: null,\n\t\t\tticks: 5\n\t\t},\n\t\tySecondary: {\n\t\t\tdomain: null,\n\t\t\tticks: 10\n\t\t}\n\t}\n});\n\n/**\n * options specific to line charts\n */\nexport interface LineChartOptions extends AxisChartOptions {\n\t/**\n\t * options for the curve of the line\n\t */\n\tcurve?: string | {\n\t\tname: string;\n\t};\n\t/**\n\t * options for the line 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};\n}\n/**\n * options specific to line charts\n */\nconst lineOptions: LineChartOptions = Tools.merge({}, axisOptions, {\n\tpoints: {\n\t\t// default point radius to 3\n\t\tradius: 3\n\t}\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};\n}\n/**\n * options specific to line charts\n */\nconst scatterOptions: ScatterChartOptions = Tools.merge({}, axisOptions, {\n\tpoints: {\n\t\t// default point radius to 4\n\t\tradius: 4,\n\t\tfillOpacity: 0.3\n\t}\n});\n\n/**\n * options specific to bar charts\n */\nexport interface BarChartOptions extends AxisChartOptions {\n\t/**\n\t * options for all bars\n\t */\n\tbars?: {\n\t\t/**\n\t\t * constrains the bars to a maximum width\n\t\t */\n\t\tmaxWidth: number;\n\t};\n}\n/**\n * options specific to bar charts\n */\nconst barOptions: BarChartOptions = Tools.merge({}, axisOptions);\n\n/**\n * options specific to bar charts\n */\nexport type StackedBarChartOptions = BarChartOptions;\n/**\n * options specific to bar charts\n */\nconst stackedBarOptions: StackedBarChartOptions = Tools.merge({}, barOptions);\n\n/**\n * Options specific to combo charts.\n *\n * This interface also extends all other AxisChartOption interfaces as the single config is shared across all charts in a combo\n */\nexport interface ComboChartOptions extends AxisChartOptions, BarChartOptions, LineChartOptions, ScatterChartOptions { }\n/**\n * Options specific to combo charts.\n *\n */\nconst comboOptions: ComboChartOptions = Tools.merge({}, axisOptions, barOptions, lineOptions, scatterOptions);\n\n/**\n * Configuration passed to the chart.\n *\n * Includes options and data\n */\nexport interface ChartConfig<T extends BaseChartOptions> {\n\toptions: T;\n\tdata: ChartData | Promise<ChartData>;\n}\n\nexport const options = {\n\tBASE: baseOptions,\n\tAXIS: axisOptions,\n\tLINE: lineOptions,\n\tSCATTER: scatterOptions,\n\tBAR: barOptions,\n\tSTACKED_BAR: stackedBarOptions,\n\tCOMBO: comboOptions,\n\tPIE: pieOptions,\n\tDONUT: donutOptions\n};\n\nexport interface DataSet {\n\t/**\n\t * Label for the dataset\n\t */\n\tlabel: string;\n\t/**\n\t * Array of hex background colors\n\t */\n\tbackgroundColors: Array<string>;\n\t/**\n\t * Array of data values\n\t */\n\tdata: Array<any>;\n\t/**\n\t * chartType - only used with combo charts\n\t */\n\tchartType?: ChartType;\n}\n\nexport interface ChartData {\n\t/**\n\t * Labels for the x (horizontal) axis. Should match the number of items in each dataset data array\n\t */\n\tlabels: Array<string>;\n\t/**\n\t * Array of datasets to display in the chart\n\t */\n\tdatasets: Array<DataSet>;\n}\n\n/*\n ********************************************\n * Internal (non-user configurable) options *\n ********************************************\n */\n\n/**\n * General chart options. margins, min/max widths, etc\n */\nexport const charts = {\n\tmargin: {\n\t\ttop: 20,\n\t\tbottom: 60,\n\t\tleft: 60,\n\t\tright: 20,\n\t\tbar: {\n\t\t\ttop: 0,\n\t\t\tright: -40,\n\t\t\tbottom: 50,\n\t\t\tleft: 40\n\t\t},\n\t\tline: {\n\t\t\ttop: 0,\n\t\t\tright: -40,\n\t\t\tbottom: 50,\n\t\t\tleft: 40\n\t\t}\n\t},\n\tresetOpacity: {\n\t\topacity: 1,\n\t\tcircle: {\n\t\t\tfill: \"white\"\n\t\t},\n\t\toutline: \"grey\"\n\t},\n\treduceOpacity: {\n\t\topacity: 0.25,\n\t\toutline: \"grey\"\n\t},\n\tpoints: {\n\t\tradius: 3\n\t},\n\tpatternFills: {\n\t\twidth: 20,\n\t\theight: 20\n\t},\n\tminWidth: 150,\n\twidthBreak: 600,\n\tmarginForLegendTop: 40,\n\tmagicRatio: 0.7,\n\tmagicMoreForY2Axis: 70,\n\taxisCharts: {\n\t\tminWidth: 100,\n\t\tminHeight: 200\n\t}\n};\n\n/**\n * Options to render scales to spec\n */\nexport const scales = {\n\tmaxWidthOfAxisLabel: 175,\n\tmaxNumOfAxisLabelLetters: 60,\n\tyAxisAngle: -90,\n\txAxisAngle: -45,\n\tdomain: {\n\t\tcolor: \"#959595\",\n\t\tstrokeWidth: 2\n\t},\n\tdx: \"-1em\",\n\tlabel: {\n\t\tdy: \"1em\"\n\t},\n\ttick: {\n\t\tdy: \"0.5em\",\n\t\twidthAdditionY: 25,\n\t\twidthAdditionY2: 15,\n\t\theightAddition: 16,\n\t\tlineHeight: 1.1\n\t},\n\tmagicDy1: \"0.71em\",\n\tmagicY1: 9,\n\tmagicX1: -4,\n\ty: {\n\t\tnumberOfTicks: 5,\n\t\tthresholds: {\n\t\t\tcolors: {\n\t\t\t\t\"danger\": \"rgba(255, 39, 41, 0.1)\",\n\t\t\t\t\"success\": \"rgba(0, 212, 117, 0.1)\",\n\t\t\t\t\"warning\": \"rgba(255, 214, 0, 0.1)\"\n\n\t\t\t}\n\t\t}\n\t},\n\tx: {\n\t\tnumberOfTicks: 5,\n\t\tpadding: 0.2\n\t},\n\ty2: {\n\t\tnumberOfTicks: 5\n\t}\n};\n\n/**\n * Grid options\n */\nexport const grid = {\n\tstrokeColor: \"#ECEEEF\"\n};\n\n/**\n * Options for bar behaviour\n */\nexport const bars = {\n\tmouseover: {\n\t\tstrokeWidth: 4,\n\t\tstrokeOpacity: 0.5\n\t},\n\tmouseout: {\n\t\tstrokeWidth: 0,\n\t\tstrokeWidthAccessible: 2,\n\t\tstrokeOpacity: 1\n\t},\n\tdefault: {\n\t\tstrokeWidth: 2\n\t},\n\tspacing: {\n\t\tbars: 0.2,\n\t\tdatasets: 0.25\n\t},\n\tbars: {\n\t\tmaxWidth: null\n\t}\n};\n\n/**\n * Options for line behaviour\n */\nexport const lines = {\n\tpoints: {\n\t\tstrokeWidth: 4,\n\t\tminNonFilledRadius: 3,\n\t\tmouseover: {\n\t\t\tstrokeWidth: 4,\n\t\t\tstrokeOpacity: 0.5\n\t\t},\n\t\tmouseout: {\n\t\t\tstrokeWidth: 0,\n\t\t\tstrokeWidthAccessible: 2,\n\t\t\tstrokeOpacity: 1\n\t\t}\n\t}\n};\n\n/**\n * Options for pie behaviour\n */\nexport const pie = {\n\tmaxWidth: 516.6,\n\tmouseover: {\n\t\tstrokeWidth: 6,\n\t\tstrokeOpacity: 0.5\n\t},\n\tmouseout: {\n\t\tstrokeWidth: 0,\n\t\tstrokeOpacity: 1\n\t},\n\tsliceLimit: 6,\n\tlabel: {\n\t\tdy: \".32em\",\n\t\tmargin: 8,\n\t\tother: \"Other\"\n\t},\n\tdefault: {\n\t\tstrokeWidth: 2\n\t}\n};\n\n/**\n * Options for donut behaviour\n */\nexport const donut = {\n\tcenterText: {\n\t\ttitle: {\n\t\t\ty: 22\n\t\t},\n\t\tbreakpoint: 175,\n\t\tmagicScaleRatio: 2.5,\n\t\tnumberFontSize: 24,\n\t\ttitleFontSize: 15\n\t}\n};\n\n/**\n * Legend configuration\n */\nexport const legend = {\n\tcountBreak: 4,\n\tfontSize: 12,\n\twrapperHeight: \"40px\",\n\twidthTolerance: 15,\n\thoverShadowSize: \"3px\",\n\thoverShadowTransparency: 0.2,\n\tmargin: {\n\t\ttop: 19\n\t},\n\tactive: {\n\t\tborderColor: false,\n\t\tborderStyle: false,\n\t\tborderWidth: false\n\t},\n\tinactive: {\n\t\tbackgroundColor: \"white\",\n\t\tborderStyle: \"solid\",\n\t\tborderWidth: \"2px\"\n\t},\n\titems: {\n\t\tstatus: {\n\t\t\tACTIVE: 1,\n\t\t\tDISABLED: 0\n\t\t},\n\t},\n\tbasedOn: {\n\t\tSERIES: \"series\",\n\t\tLABELS: \"labels\"\n\t}\n};\n\n/**\n * Tooltip options\n */\nexport const tooltip = {\n\twidth: 200,\n\tarrowWidth: 10,\n\tmagicXPoint2: 20,\n\tmagicTop1: 21,\n\tmagicTop2: 22,\n\tmagicLeft1: 11,\n\tmagicLeft2: 10,\n\tfadeIn: {\n\t\tduration: 250\n\t},\n\tfadeOut: {\n\t\tduration: 250\n\t},\n\tsize: {\n\t\tCOMPACT: \"compact\"\n\t}\n};\n\n/**\n * Base transition configuration\n */\nexport const transitions = {\n\tdefault: {\n\t\tduration: 750\n\t}\n};\n\n/**\n * Selectors to standardize querying parts of the chart\n */\nexport const selectors = {\n\tOUTERSVG: \"svg.chart-svg\",\n\tINNERWRAP: \"g.inner-wrap\",\n\tCHARTWRAPPER: \"div.chart-wrapper\",\n\tTOOLTIP: \"div.chart-tooltip\",\n\tLEGEND_BTN: \"li.legend-btn\",\n\tpie: {\n\t\tSLICE: \"path\"\n\t}\n};\n"]}
|
package/index.d.ts
CHANGED
|
@@ -6,5 +6,6 @@ import { BarChart } from "./bar-chart";
|
|
|
6
6
|
import { LineChart } from "./line-chart";
|
|
7
7
|
import { ComboChart } from "./combo-chart";
|
|
8
8
|
import { ScatterChart } from "./scatter-chart";
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
import * as colorPalettes from "./services/colorPalettes";
|
|
10
|
+
declare const defaultColors: any[];
|
|
11
|
+
export { defaultColors, colorPalettes, BaseChart, BaseAxisChart, PieChart, DonutChart, DonutCenter, BarChart, LineChart, ComboChart, ScatterChart };
|
package/index.js
CHANGED
|
@@ -7,7 +7,8 @@ import { BarChart } from "./bar-chart";
|
|
|
7
7
|
import { LineChart } from "./line-chart";
|
|
8
8
|
import { ComboChart } from "./combo-chart";
|
|
9
9
|
import { ScatterChart } from "./scatter-chart";
|
|
10
|
-
import * as
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
import * as colorPalettes from "./services/colorPalettes";
|
|
11
|
+
// TODO 1.0 - Remove deprecated API
|
|
12
|
+
var defaultColors = colorPalettes.DEFAULT;
|
|
13
|
+
export { defaultColors, colorPalettes, BaseChart, BaseAxisChart, PieChart, DonutChart, DonutCenter, BarChart, LineChart, ComboChart, ScatterChart };
|
|
13
14
|
//# sourceMappingURL=/home/travis/build/carbon-design-system/carbon-charts/packages/core/index.js.map
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,aAAa,CAAC,CAAC;AAEvB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,KAAK,aAAa,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,aAAa,CAAC,CAAC;AAEvB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,KAAK,aAAa,MAAM,0BAA0B,CAAC;AAC1D,mCAAmC;AACnC,IAAM,aAAa,GAAG,aAAa,CAAC,OAAO,CAAC;AAE5C,OAAO,EACN,aAAa,EACb,aAAa,EACb,SAAS,EACT,aAAa,EACb,QAAQ,EACR,UAAU,EACV,WAAW,EACX,QAAQ,EACR,SAAS,EACT,UAAU,EACV,YAAY,EACZ,CAAC","sourcesContent":["require(\"./polyfills\");\n\nimport { BaseChart } from \"./base-chart\";\nimport { BaseAxisChart } from \"./base-axis-chart\";\n\nimport { PieChart } from \"./pie-chart\";\nimport { DonutChart, DonutCenter } from \"./donut-chart\";\nimport { BarChart } from \"./bar-chart\";\nimport { LineChart } from \"./line-chart\";\nimport { ComboChart } from \"./combo-chart\";\nimport { ScatterChart } from \"./scatter-chart\";\n\nimport * as colorPalettes from \"./services/colorPalettes\";\n// TODO 1.0 - Remove deprecated API\nconst defaultColors = colorPalettes.DEFAULT;\n\nexport {\n\tdefaultColors,\n\tcolorPalettes,\n\tBaseChart,\n\tBaseAxisChart,\n\tPieChart,\n\tDonutChart,\n\tDonutCenter,\n\tBarChart,\n\tLineChart,\n\tComboChart,\n\tScatterChart\n};\n"]}
|