@carbon/charts 0.54.10 → 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/charts/meter.js CHANGED
@@ -11,6 +11,13 @@ var __extends = (this && this.__extends) || (function () {
11
11
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
12
12
  };
13
13
  })();
14
+ var __spreadArrays = (this && this.__spreadArrays) || function () {
15
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
16
+ for (var r = Array(s), k = 0, i = 0; i < il; i++)
17
+ for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
18
+ r[k] = a[j];
19
+ return r;
20
+ };
14
21
  // Internal Imports
15
22
  import { MeterChartModel } from '../model/meter';
16
23
  import { Chart } from '../chart';
@@ -37,29 +44,41 @@ var MeterChart = /** @class */ (function (_super) {
37
44
  return _this;
38
45
  }
39
46
  MeterChart.prototype.getComponents = function () {
40
- // Specify what to render inside the graph only
41
- var graph = {
42
- id: 'meter-graph',
43
- components: [new Meter(this.model, this.services)],
44
- growth: LayoutGrowth.STRETCH,
45
- renderType: RenderTypes.SVG,
46
- };
47
- // Meter has an unique dataset title within the graph
48
- var titleComponent = {
49
- id: 'meter-title',
50
- components: [new MeterTitle(this.model, this.services)],
51
- growth: LayoutGrowth.STRETCH,
52
- renderType: RenderTypes.SVG,
53
- };
54
- // create the title spacer
55
- var titleSpacerComponent = {
56
- id: 'spacer',
57
- components: [new Spacer(this.model, this.services, { size: 8 })],
58
- growth: LayoutGrowth.STRETCH,
59
- };
47
+ var showLabels = Tools.getProperty(this.model.getOptions(), 'meter', 'showLabels');
48
+ var meterComponents = __spreadArrays((showLabels
49
+ ? [
50
+ // Meter has a unique dataset title within the graph
51
+ {
52
+ id: 'meter-title',
53
+ components: [
54
+ new MeterTitle(this.model, this.services),
55
+ ],
56
+ growth: LayoutGrowth.STRETCH,
57
+ renderType: RenderTypes.SVG,
58
+ },
59
+ // Create the title spacer
60
+ {
61
+ id: 'spacer',
62
+ components: [
63
+ new Spacer(this.model, this.services, {
64
+ size: 8,
65
+ }),
66
+ ],
67
+ growth: LayoutGrowth.STRETCH,
68
+ },
69
+ ]
70
+ : []), [
71
+ // Specify what to render inside the graph only
72
+ {
73
+ id: 'meter-graph',
74
+ components: [new Meter(this.model, this.services)],
75
+ growth: LayoutGrowth.STRETCH,
76
+ renderType: RenderTypes.SVG,
77
+ },
78
+ ]);
60
79
  // the graph frame for meter includes the custom title (and spacer)
61
80
  var graphFrame = [
62
- new LayoutComponent(this.model, this.services, [titleComponent, titleSpacerComponent, graph], {
81
+ new LayoutComponent(this.model, this.services, meterComponents, {
63
82
  direction: LayoutDirection.COLUMN,
64
83
  }),
65
84
  ];
@@ -1 +1 @@
1
- {"version":3,"file":"meter.js","sourceRoot":"","sources":["meter.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mBAAmB;AACnB,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,KAAK,aAAa,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAGN,YAAY,EACZ,eAAe,EACf,WAAW,GACX,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAErD,aAAa;AACb,OAAO,EAKN,eAAe,EACf,UAAU,EACV,MAAM,GACN,MAAM,qBAAqB,CAAC;AAE7B;IAAgC,8BAAK;IAGpC,oBAAY,MAAe,EAAE,YAA4C;QAAzE,YACC,kBAAM,MAAM,EAAE,YAAY,CAAC,SAmB3B;QAtBD,WAAK,GAAG,IAAI,eAAe,CAAC,KAAI,CAAC,QAAQ,CAAC,CAAC;QAK1C,kDAAkD;QAClD,IAAI,OAAO,GAAG,YAAY,CAAC,OAAO,CAAC,KAAK,CAAC,YAAY;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,IAAM,UAAU,GAAG;YAClB,IAAI,eAAe,CAClB,IAAI,CAAC,KAAK,EACV,IAAI,CAAC,QAAQ,EACb,CAAC,cAAc,EAAE,oBAAoB,EAAE,KAAK,CAAC,EAC7C;gBACC,SAAS,EAAE,eAAe,CAAC,MAAM;aACjC,CACD;SACD,CAAC;QAEF,+CAA+C;QAC/C,IAAM,UAAU,GAAU,IAAI,CAAC,kBAAkB,CAAC,UAAU,EAAE;YAC7D,oBAAoB,EAAE,WAAW,CAAC,IAAI;SACtC,CAAC,CAAC;QAEH,OAAO,UAAU,CAAC;IACnB,CAAC;IACF,iBAAC;AAAD,CAAC,AApED,CAAgC,KAAK,GAoEpC","sourcesContent":["// Internal Imports\nimport { MeterChartModel } from '../model/meter';\nimport { Chart } from '../chart';\nimport * as Configuration from '../configuration';\nimport {\n\tChartConfig,\n\tMeterChartOptions,\n\tLayoutGrowth,\n\tLayoutDirection,\n\tRenderTypes,\n} from '../interfaces/index';\nimport { Tools } from '../tools';\nimport { Meter } from './../components/graphs/meter';\n\n// Components\nimport {\n\tPie,\n\t// the imports below are needed because of typescript bug (error TS4029)\n\tTooltip,\n\tLegend,\n\tLayoutComponent,\n\tMeterTitle,\n\tSpacer,\n} from '../components/index';\n\nexport class MeterChart extends Chart {\n\tmodel = new MeterChartModel(this.services);\n\n\tconstructor(holder: Element, chartConfigs: ChartConfig<MeterChartOptions>) {\n\t\tsuper(holder, chartConfigs);\n\n\t\t// use prop meter options or regular meter options\n\t\tlet options = chartConfigs.options.meter.proportional\n\t\t\t? Tools.merge(\n\t\t\t\t\tTools.clone(Configuration.options.proportionalMeterChart),\n\t\t\t\t\tchartConfigs.options\n\t\t\t )\n\t\t\t: Tools.merge(\n\t\t\t\t\tTools.clone(Configuration.options.meterChart),\n\t\t\t\t\tchartConfigs.options\n\t\t\t );\n\n\t\t// Merge the default options for this chart\n\t\t// With the user provided options\n\t\tthis.model.setOptions(options);\n\n\t\t// Initialize data, services, components etc.\n\t\tthis.init(holder, chartConfigs);\n\t}\n\n\tgetComponents() {\n\t\t// Specify what to render inside the graph only\n\t\tconst graph = {\n\t\t\tid: 'meter-graph',\n\t\t\tcomponents: [new Meter(this.model, this.services)],\n\t\t\tgrowth: LayoutGrowth.STRETCH,\n\t\t\trenderType: RenderTypes.SVG,\n\t\t};\n\n\t\t// Meter has an unique dataset title within the graph\n\t\tconst titleComponent = {\n\t\t\tid: 'meter-title',\n\t\t\tcomponents: [new MeterTitle(this.model, this.services)],\n\t\t\tgrowth: LayoutGrowth.STRETCH,\n\t\t\trenderType: RenderTypes.SVG,\n\t\t};\n\n\t\t// create the title spacer\n\t\tconst titleSpacerComponent = {\n\t\t\tid: 'spacer',\n\t\t\tcomponents: [new Spacer(this.model, this.services, { size: 8 })],\n\t\t\tgrowth: LayoutGrowth.STRETCH,\n\t\t};\n\n\t\t// the graph frame for meter includes the custom title (and spacer)\n\t\tconst graphFrame = [\n\t\t\tnew LayoutComponent(\n\t\t\t\tthis.model,\n\t\t\t\tthis.services,\n\t\t\t\t[titleComponent, titleSpacerComponent, graph],\n\t\t\t\t{\n\t\t\t\t\tdirection: LayoutDirection.COLUMN,\n\t\t\t\t}\n\t\t\t),\n\t\t];\n\n\t\t// add the meter title as a top level component\n\t\tconst components: any[] = this.getChartComponents(graphFrame, {\n\t\t\tgraphFrameRenderType: RenderTypes.HTML,\n\t\t});\n\n\t\treturn components;\n\t}\n}\n"]}
1
+ {"version":3,"file":"meter.js","sourceRoot":"","sources":["meter.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,mBAAmB;AACnB,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,KAAK,aAAa,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAGN,YAAY,EACZ,eAAe,EACf,WAAW,GACX,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,C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AAE,WAAW,CAAC,GAAG;iBAC3B;gBACD,0BAA0B;gBAC1B;oBACC,EAAE,EAAE,QAAQ;oBACZ,UAAU,EAAE;wBACX,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE;4BACrC,IAAI,EAAE,CAAC;yBACP,CAAC;qBACF;oBACD,MAAM,EAAE,YAAY,CAAC,OAAO;iBAC5B;aACA;YACH,CAAC,CAAC,EAAE,CAAC;YACN,+CAA+C;YAC/C;gBACC,EAAE,EAAE,aAAa;gBACjB,UAAU,EAAE,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;gBAClD,MAAM,EAAE,YAAY,CAAC,OAAO;gBAC5B,UAAU,EAAE,WAAW,CAAC,GAAG;aAC3B;UACD,CAAC;QAEF,mEAAmE;QACnE,IAAM,UAAU,GAAG;YAClB,IAAI,eAAe,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE,eAAe,EAAE;gBAC/D,SAAS,EAAE,eAAe,CAAC,MAAM;aACjC,CAAC;SACF,CAAC;QAEF,+CAA+C;QAC/C,IAAM,UAAU,GAAU,IAAI,CAAC,kBAAkB,CAAC,UAAU,EAAE;YAC7D,oBAAoB,EAAE,WAAW,CAAC,IAAI;SACtC,CAAC,CAAC;QAEH,OAAO,UAAU,CAAC;IACnB,CAAC;IACF,iBAAC;AAAD,CAAC,AA9ED,CAAgC,KAAK,GA8EpC","sourcesContent":["// Internal Imports\nimport { MeterChartModel } from '../model/meter';\nimport { Chart } from '../chart';\nimport * as Configuration from '../configuration';\nimport {\n\tChartConfig,\n\tMeterChartOptions,\n\tLayoutGrowth,\n\tLayoutDirection,\n\tRenderTypes,\n} from '../interfaces/index';\nimport { Tools } from '../tools';\nimport { Meter } from './../components/graphs/meter';\n\n// Components\nimport {\n\tPie,\n\t// the imports below are needed because of typescript bug (error TS4029)\n\tTooltip,\n\tLegend,\n\tLayoutComponent,\n\tMeterTitle,\n\tSpacer,\n} from '../components/index';\n\nexport class MeterChart extends Chart {\n\tmodel = new MeterChartModel(this.services);\n\n\tconstructor(holder: Element, chartConfigs: ChartConfig<MeterChartOptions>) {\n\t\tsuper(holder, chartConfigs);\n\n\t\t// use prop meter options or regular meter options\n\t\tlet options = chartConfigs.options.meter.proportional\n\t\t\t? Tools.merge(\n\t\t\t\t\tTools.clone(Configuration.options.proportionalMeterChart),\n\t\t\t\t\tchartConfigs.options\n\t\t\t )\n\t\t\t: Tools.merge(\n\t\t\t\t\tTools.clone(Configuration.options.meterChart),\n\t\t\t\t\tchartConfigs.options\n\t\t\t );\n\n\t\t// Merge the default options for this chart\n\t\t// With the user provided options\n\t\tthis.model.setOptions(options);\n\n\t\t// Initialize data, services, components etc.\n\t\tthis.init(holder, chartConfigs);\n\t}\n\n\tgetComponents() {\n\t\tconst showLabels = Tools.getProperty(\n\t\t\tthis.model.getOptions(),\n\t\t\t'meter',\n\t\t\t'showLabels'\n\t\t);\n\t\tconst meterComponents = [\n\t\t\t...(showLabels\n\t\t\t\t? [\n\t\t\t\t\t\t// Meter has a unique dataset title within the graph\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tid: 'meter-title',\n\t\t\t\t\t\t\tcomponents: [\n\t\t\t\t\t\t\t\tnew MeterTitle(this.model, this.services),\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\tgrowth: LayoutGrowth.STRETCH,\n\t\t\t\t\t\t\trenderType: RenderTypes.SVG,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t// Create the title spacer\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tid: 'spacer',\n\t\t\t\t\t\t\tcomponents: [\n\t\t\t\t\t\t\t\tnew Spacer(this.model, this.services, {\n\t\t\t\t\t\t\t\t\tsize: 8,\n\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\tgrowth: LayoutGrowth.STRETCH,\n\t\t\t\t\t\t},\n\t\t\t\t ]\n\t\t\t\t: []),\n\t\t\t// Specify what to render inside the graph only\n\t\t\t{\n\t\t\t\tid: 'meter-graph',\n\t\t\t\tcomponents: [new Meter(this.model, this.services)],\n\t\t\t\tgrowth: LayoutGrowth.STRETCH,\n\t\t\t\trenderType: RenderTypes.SVG,\n\t\t\t},\n\t\t];\n\n\t\t// the graph frame for meter includes the custom title (and spacer)\n\t\tconst graphFrame = [\n\t\t\tnew LayoutComponent(this.model, this.services, meterComponents, {\n\t\t\t\tdirection: LayoutDirection.COLUMN,\n\t\t\t}),\n\t\t];\n\n\t\t// add the meter title as a top level component\n\t\tconst components: any[] = this.getChartComponents(graphFrame, {\n\t\t\tgraphFrameRenderType: RenderTypes.HTML,\n\t\t});\n\n\t\treturn components;\n\t}\n}\n"]}
package/configuration.js CHANGED
@@ -415,6 +415,7 @@ var meterChart = Tools.merge({}, chart, {
415
415
  clickable: false,
416
416
  },
417
417
  meter: {
418
+ showLabels: true,
418
419
  proportional: null,
419
420
  statusBar: {
420
421
  percentageIndicator: {
@@ -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,OAAO,E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AC,IAAM,OAAO,GAAG;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\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\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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;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\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"]}
@@ -346,6 +346,7 @@ export interface DonutChartOptions extends PieChartOptions {
346
346
  }
347
347
  export interface MeterChartOptions extends BaseChartOptions {
348
348
  meter?: {
349
+ showLabels?: boolean;
349
350
  proportional?: {
350
351
  total?: number;
351
352
  unit?: string;
@@ -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"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@carbon/charts",
3
- "version": "0.54.10",
3
+ "version": "0.54.11",
4
4
  "description": "Carbon charting components",
5
5
  "main": "./bundle.js",
6
6
  "module": "./index.js",
@@ -154,7 +154,7 @@
154
154
  "signature": "40479353a4fea9dd15e631f03b9bf3d724d627a49c7491ac3c3781275de9ba88"
155
155
  },
156
156
  "../src/configuration.ts": {
157
- "version": "559632bd1f0cf18f59bf5b13eb39b599a4d5b8f00b4ba2d96cf0220c06369338",
157
+ "version": "0e14ed682c0c42ed3a12c2dbb0f22bd2a7b6515f69c95d9742fae67154485546",
158
158
  "signature": "bf067832dce54806fcbae20b3c812f4f4c87f362d322ede6f3bc416a92d9dbcd"
159
159
  },
160
160
  "../../../node_modules/@types/d3-time/index.d.ts": {
@@ -254,8 +254,8 @@
254
254
  "signature": "c9e5b626cb6cc90b535dcaa930e64a4e033bfcb132abfd16a07edc4deeb1d99c"
255
255
  },
256
256
  "../src/interfaces/charts.ts": {
257
- "version": "65e2e2260ae7756b2da1419ce2663846ee3a002966d3b6993ac9b8f480f42e5d",
258
- "signature": "4ab04c1d81bfe658f45974e93e8637302e47eb0fd3acc859dd1cc13b5eb9b74c"
257
+ "version": "ee9b0d121d33b4b98ff426b913abf9381ec121c647cfa93413d9abca6478d1be",
258
+ "signature": "0a1a321f59ac9dbe13703d28c6438c73ab34410fd6eae306c3fa9fb669923cc9"
259
259
  },
260
260
  "../src/interfaces/layout.ts": {
261
261
  "version": "684de2d7c612bd74a9d8e866b0b94cc53bd824422be4b3d216dc6682614e5fe8",
@@ -598,7 +598,7 @@
598
598
  "signature": "3a1fe784c2963d2d901699458743db24c1a67b21272773f70df4d78dbef63914"
599
599
  },
600
600
  "../src/charts/meter.ts": {
601
- "version": "15ca2934b264cd56ba6bf5df8fd23feb70f7c4933bc28bd4065c372f7ccb51b4",
601
+ "version": "d3096fc30b085556b345c9324b4360d6e315a11c7e1d8420da31ef03893c9fd4",
602
602
  "signature": "f6d5c0867ab7123af740241442019544fa419e988af53618bd548a765e754be5"
603
603
  },
604
604
  "../src/model/radar.ts": {