genesys-spark-chart-components 4.181.0 → 4.182.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.
Files changed (28) hide show
  1. package/dist/cjs/{color-palette-rZ3qmWrO.js → color-palette-Efqb_jJn.js} +1 -1
  2. package/dist/cjs/gux-chart-column-beta.cjs.entry.js +1 -1
  3. package/dist/cjs/gux-chart-donut-beta.cjs.entry.js +1 -1
  4. package/dist/cjs/gux-chart-line-beta.cjs.entry.js +1 -1
  5. package/dist/cjs/gux-chart-pie-beta.cjs.entry.js +1 -1
  6. package/dist/cjs/gux-chart-scatter-plot-beta.cjs.entry.js +1 -1
  7. package/dist/cjs/gux-visualization-beta.cjs.entry.js +2 -3
  8. package/dist/collection/components/beta/gux-visualization/gux-visualization.js +2 -3
  9. package/dist/esm/{color-palette-D12bQZpc.js → color-palette-wRl9qA4f.js} +1 -1
  10. package/dist/esm/gux-chart-column-beta.entry.js +1 -1
  11. package/dist/esm/gux-chart-donut-beta.entry.js +1 -1
  12. package/dist/esm/gux-chart-line-beta.entry.js +1 -1
  13. package/dist/esm/gux-chart-pie-beta.entry.js +1 -1
  14. package/dist/esm/gux-chart-scatter-plot-beta.entry.js +1 -1
  15. package/dist/esm/gux-visualization-beta.entry.js +2 -3
  16. package/dist/genesys-chart-webcomponents/genesys-chart-webcomponents.esm.js +1 -1
  17. package/dist/genesys-chart-webcomponents/{p-7c823c2c.entry.js → p-114a72f3.entry.js} +1 -1
  18. package/dist/genesys-chart-webcomponents/{p-c4d0ff6d.entry.js → p-7e466156.entry.js} +2 -2
  19. package/dist/genesys-chart-webcomponents/{p-1c7e8dc8.entry.js → p-9528a3dd.entry.js} +1 -1
  20. package/dist/genesys-chart-webcomponents/{p-f8e7ee54.entry.js → p-b43d40db.entry.js} +1 -1
  21. package/dist/genesys-chart-webcomponents/{p-c2250641.entry.js → p-ca49d283.entry.js} +1 -1
  22. package/dist/genesys-chart-webcomponents/{p-a2d3cb1f.entry.js → p-f8838ad4.entry.js} +1 -1
  23. package/dist/genesys-chart-webcomponents/{p-D12bQZpc.js → p-wRl9qA4f.js} +1 -1
  24. package/package.json +7 -7
  25. package/dist/collection/genesys-spark-utils/get-closest-element.js +0 -17
  26. package/dist/collection/genesys-spark-utils/intl.js +0 -131
  27. package/dist/types/genesys-spark-utils/get-closest-element.d.ts +0 -1
  28. package/dist/types/genesys-spark-utils/intl.d.ts +0 -30
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const version = "4.181.0";
3
+ const version = "4.182.1";
4
4
  var packageInfo = {
5
5
  version: version};
6
6
 
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var index = require('./index-Db4-7Uyl.js');
4
- var colorPalette = require('./color-palette-rZ3qmWrO.js');
4
+ var colorPalette = require('./color-palette-Efqb_jJn.js');
5
5
  var logError = require('./log-error-BMPVm36Q.js');
6
6
 
7
7
  const guxChartColumnCss = "gux-visualization-beta{height:fit-content;color:#2e394c;}gux-visualization-beta .mark-rect.layer_0_marks path{fill:url(#diagonalHatch0)}gux-visualization-beta{}gux-visualization-beta .mark-rect.layer_1_marks path{fill:#1da8b3}";
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var index = require('./index-Db4-7Uyl.js');
4
- var colorPalette = require('./color-palette-rZ3qmWrO.js');
4
+ var colorPalette = require('./color-palette-Efqb_jJn.js');
5
5
  var logError = require('./log-error-BMPVm36Q.js');
6
6
 
7
7
  const guxChartDonutCss = "gux-visualization-beta{height:fit-content;color:#2e394c}";
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var index = require('./index-Db4-7Uyl.js');
4
- var colorPalette = require('./color-palette-rZ3qmWrO.js');
4
+ var colorPalette = require('./color-palette-Efqb_jJn.js');
5
5
  var logError = require('./log-error-BMPVm36Q.js');
6
6
 
7
7
  const guxChartLineCss = "gux-visualization-beta{height:fit-content;color:#2e394c}";
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var index = require('./index-Db4-7Uyl.js');
4
- var colorPalette = require('./color-palette-rZ3qmWrO.js');
4
+ var colorPalette = require('./color-palette-Efqb_jJn.js');
5
5
  var logError = require('./log-error-BMPVm36Q.js');
6
6
 
7
7
  const guxChartPieCss = "gux-visualization-beta{height:fit-content;color:#2e394c}";
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var index = require('./index-Db4-7Uyl.js');
4
- var colorPalette = require('./color-palette-rZ3qmWrO.js');
4
+ var colorPalette = require('./color-palette-Efqb_jJn.js');
5
5
  var logError = require('./log-error-BMPVm36Q.js');
6
6
 
7
7
  const guxChartScatterPlotCss = "gux-visualization-beta{height:fit-content;color:#2e394c}";
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var index$2 = require('./index-Db4-7Uyl.js');
4
- var colorPalette = require('./color-palette-rZ3qmWrO.js');
4
+ var colorPalette = require('./color-palette-Efqb_jJn.js');
5
5
 
6
6
  // Note: This regex matches even invalid JSON strings, but since we’re
7
7
  // working on the output of `JSON.stringify` we know that only valid strings
@@ -68900,7 +68900,6 @@ function requireD3RsIntl_umd_min () {
68900
68900
 
68901
68901
  var d3RsIntl_umd_minExports = requireD3RsIntl_umd_min();
68902
68902
 
68903
- //https://inindca.atlassian.net/browse/COMUI-2673
68904
68903
  // utility to get the closest element passing shadow dom boundaries
68905
68904
  function getClosestElement(baseElement, selector) {
68906
68905
  function closest(element) {
@@ -69044,7 +69043,7 @@ const GuxVisualization = class {
69044
69043
  this.chartComponentReady.emit();
69045
69044
  }
69046
69045
  render() {
69047
- return (index$2.h("div", { key: '9e51bf1a596cbf48b182337b9fcabd95e1fc01dc', class: "gux-chart-container", ref: el => (this.chartContainer = el) }));
69046
+ return (index$2.h("div", { key: '26f69e7d9a719f90fb87abdfaf5cf7c135de8750', class: "gux-chart-container", ref: el => (this.chartContainer = el) }));
69048
69047
  }
69049
69048
  get root() { return index$2.getElement(this); }
69050
69049
  };
@@ -2,8 +2,7 @@
2
2
  import { h } from "@stencil/core";
3
3
  import embed from "vega-embed";
4
4
  import { time } from "@redsift/d3-rs-intl";
5
- import * as sparkIntl from "../../../genesys-spark-utils/intl";
6
- // Remove with this ticket https://inindca.atlassian.net/browse/COMUI-2598
5
+ import { sparkIntl } from "genesys-spark-utils";
7
6
  import { trackComponent } from "../../../utils/tracking/usage";
8
7
  import * as VisualizationColorUtil from "../../../utils/theme/color-palette";
9
8
  export class GuxVisualization {
@@ -72,7 +71,7 @@ export class GuxVisualization {
72
71
  this.chartComponentReady.emit();
73
72
  }
74
73
  render() {
75
- return (h("div", { key: '9e51bf1a596cbf48b182337b9fcabd95e1fc01dc', class: "gux-chart-container", ref: el => (this.chartContainer = el) }));
74
+ return (h("div", { key: '26f69e7d9a719f90fb87abdfaf5cf7c135de8750', class: "gux-chart-container", ref: el => (this.chartContainer = el) }));
76
75
  }
77
76
  static get is() { return "gux-visualization-beta"; }
78
77
  static get encapsulation() { return "shadow"; }
@@ -1,4 +1,4 @@
1
- const version = "4.181.0";
1
+ const version = "4.182.1";
2
2
  var packageInfo = {
3
3
  version: version};
4
4
 
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, h, g as getElement } from './index-DohbbG4E.js';
2
- import { D as DEFAULT_LABEL_COLOR, a as DEFAULT_DOMAIN_COLOR, V as VISUALIZATION_COLORS, t as trackComponent } from './color-palette-D12bQZpc.js';
2
+ import { D as DEFAULT_LABEL_COLOR, a as DEFAULT_DOMAIN_COLOR, V as VISUALIZATION_COLORS, t as trackComponent } from './color-palette-wRl9qA4f.js';
3
3
  import { l as logError } from './log-error-nsqlWzyl.js';
4
4
 
5
5
  const guxChartColumnCss = "gux-visualization-beta{height:fit-content;color:#2e394c;}gux-visualization-beta .mark-rect.layer_0_marks path{fill:url(#diagonalHatch0)}gux-visualization-beta{}gux-visualization-beta .mark-rect.layer_1_marks path{fill:#1da8b3}";
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, h, g as getElement } from './index-DohbbG4E.js';
2
- import { V as VISUALIZATION_COLORS, t as trackComponent } from './color-palette-D12bQZpc.js';
2
+ import { V as VISUALIZATION_COLORS, t as trackComponent } from './color-palette-wRl9qA4f.js';
3
3
  import { l as logError } from './log-error-nsqlWzyl.js';
4
4
 
5
5
  const guxChartDonutCss = "gux-visualization-beta{height:fit-content;color:#2e394c}";
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, h, g as getElement } from './index-DohbbG4E.js';
2
- import { D as DEFAULT_LABEL_COLOR, a as DEFAULT_DOMAIN_COLOR, V as VISUALIZATION_COLORS, t as trackComponent } from './color-palette-D12bQZpc.js';
2
+ import { D as DEFAULT_LABEL_COLOR, a as DEFAULT_DOMAIN_COLOR, V as VISUALIZATION_COLORS, t as trackComponent } from './color-palette-wRl9qA4f.js';
3
3
  import { l as logError } from './log-error-nsqlWzyl.js';
4
4
 
5
5
  const guxChartLineCss = "gux-visualization-beta{height:fit-content;color:#2e394c}";
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, h, g as getElement } from './index-DohbbG4E.js';
2
- import { V as VISUALIZATION_COLORS, t as trackComponent } from './color-palette-D12bQZpc.js';
2
+ import { V as VISUALIZATION_COLORS, t as trackComponent } from './color-palette-wRl9qA4f.js';
3
3
  import { l as logError } from './log-error-nsqlWzyl.js';
4
4
 
5
5
  const guxChartPieCss = "gux-visualization-beta{height:fit-content;color:#2e394c}";
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, h, g as getElement } from './index-DohbbG4E.js';
2
- import { D as DEFAULT_LABEL_COLOR, a as DEFAULT_DOMAIN_COLOR, V as VISUALIZATION_COLORS, t as trackComponent } from './color-palette-D12bQZpc.js';
2
+ import { D as DEFAULT_LABEL_COLOR, a as DEFAULT_DOMAIN_COLOR, V as VISUALIZATION_COLORS, t as trackComponent } from './color-palette-wRl9qA4f.js';
3
3
  import { l as logError } from './log-error-nsqlWzyl.js';
4
4
 
5
5
  const guxChartScatterPlotCss = "gux-visualization-beta{height:fit-content;color:#2e394c}";
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, h as h$1, g as getElement } from './index-DohbbG4E.js';
2
- import { a as DEFAULT_DOMAIN_COLOR, D as DEFAULT_LABEL_COLOR, t as trackComponent } from './color-palette-D12bQZpc.js';
2
+ import { a as DEFAULT_DOMAIN_COLOR, D as DEFAULT_LABEL_COLOR, t as trackComponent } from './color-palette-wRl9qA4f.js';
3
3
 
4
4
  // Note: This regex matches even invalid JSON strings, but since we’re
5
5
  // working on the output of `JSON.stringify` we know that only valid strings
@@ -68898,7 +68898,6 @@ function requireD3RsIntl_umd_min () {
68898
68898
 
68899
68899
  var d3RsIntl_umd_minExports = requireD3RsIntl_umd_min();
68900
68900
 
68901
- //https://inindca.atlassian.net/browse/COMUI-2673
68902
68901
  // utility to get the closest element passing shadow dom boundaries
68903
68902
  function getClosestElement(baseElement, selector) {
68904
68903
  function closest(element) {
@@ -69042,7 +69041,7 @@ const GuxVisualization = class {
69042
69041
  this.chartComponentReady.emit();
69043
69042
  }
69044
69043
  render() {
69045
- return (h$1("div", { key: '9e51bf1a596cbf48b182337b9fcabd95e1fc01dc', class: "gux-chart-container", ref: el => (this.chartContainer = el) }));
69044
+ return (h$1("div", { key: '26f69e7d9a719f90fb87abdfaf5cf7c135de8750', class: "gux-chart-container", ref: el => (this.chartContainer = el) }));
69046
69045
  }
69047
69046
  get root() { return getElement(this); }
69048
69047
  };
@@ -1 +1 @@
1
- import{p as e,b as l}from"./p-DohbbG4E.js";export{s as setNonce}from"./p-DohbbG4E.js";import{g as a}from"./p-DQuL1Twl.js";(()=>{const l=import.meta.url,a={};return""!==l&&(a.resourcesUrl=new URL(".",l).href),e(a)})().then((async e=>(await a(),l([["p-c4d0ff6d",[[257,"gux-visualization-beta",{visualizationSpec:[16,"visualization-spec"],embedOptions:[16,"embed-options"],screenreaderDescription:[1,"screenreader-description"]}]]],["p-c2250641",[[257,"gux-chart-column-beta",{labelColor:[1,"label-color"],domainColor:[1,"domain-color"],chartData:[16,"chart-data"],xTickLabelSlant:[4,"x-tick-label-slant"],includeLegend:[4,"include-legend"],xFieldName:[1,"x-field-name"],yFieldName:[1,"y-field-name"],xAxisTitle:[1,"x-axis-title"],yAxisTitle:[1,"y-axis-title"],legendTitle:[1,"legend-title"],legendPosition:[1,"legend-position"],chartLayers:[16,"chart-layers"],embedOptions:[16,"embed-options"]},null,{chartData:["parseData"]}]]],["p-7c823c2c",[[257,"gux-chart-donut-beta",{chartData:[16,"chart-data"],includeLegend:[4,"include-legend"],legendPosition:[1,"legend-position"],legendTitle:[1,"legend-title"],colorFieldName:[1,"color-field-name"],outerRadius:[2,"outer-radius"],innerRadius:[2,"inner-radius"],labelRadius:[2,"label-radius"],labelField:[1,"label-field"],gauge:[4],centerText:[1,"center-text"],centerSubText:[1,"center-sub-text"],showTooltip:[4,"show-tooltip"],tooltipOptions:[16,"tooltip-options"],legendX:[2,"legend-x"],legendY:[2,"legend-y"],legendFontSize:[2,"legend-font-size"],legendSymbolSize:[2,"legend-symbol-size"],embedOptions:[16,"embed-options"]},null,{chartData:["parseData"]}]]],["p-f8e7ee54",[[257,"gux-chart-line-beta",{labelColor:[1,"label-color"],domainColor:[1,"domain-color"],chartData:[16,"chart-data"],xTickLabelSlant:[4,"x-tick-label-slant"],includeLegend:[4,"include-legend"],legendPosition:[1,"legend-position"],includeDataPointMarkers:[4,"include-data-point-markers"],xFieldName:[1,"x-field-name"],xAxisTitle:[1,"x-axis-title"],yFieldName:[1,"y-field-name"],yAxisTitle:[1,"y-axis-title"],legendTitle:[1,"legend-title"],colorFieldName:[1,"color-field-name"],strokeDash:[4,"stroke-dash"],interpolation:[1],embedOptions:[16,"embed-options"]},null,{chartData:["parseData"]}]]],["p-1c7e8dc8",[[257,"gux-chart-pie-beta",{chartData:[16,"chart-data"],includeLegend:[4,"include-legend"],legendPosition:[1,"legend-position"],legendTitle:[1,"legend-title"],colorFieldName:[1,"color-field-name"],outerRadius:[2,"outer-radius"],labelRadius:[2,"label-radius"],labelField:[1,"label-field"],embedOptions:[16,"embed-options"]},null,{chartData:["parseData"]}]]],["p-a2d3cb1f",[[257,"gux-chart-scatter-plot-beta",{labelColor:[1,"label-color"],domainColor:[1,"domain-color"],chartData:[16,"chart-data"],xTickLabelSlant:[4,"x-tick-label-slant"],includeLegend:[4,"include-legend"],legendPosition:[1,"legend-position"],xFieldName:[1,"x-field-name"],xAxisTitle:[1,"x-axis-title"],yFieldName:[1,"y-field-name"],yAxisTitle:[1,"y-axis-title"],legendTitle:[1,"legend-title"],colorFieldName:[1,"color-field-name"],useShape:[1,"use-shape"],embedOptions:[16,"embed-options"]},null,{chartData:["parseData"]}]]]],e))));
1
+ import{p as e,b as l}from"./p-DohbbG4E.js";export{s as setNonce}from"./p-DohbbG4E.js";import{g as a}from"./p-DQuL1Twl.js";(()=>{const l=import.meta.url,a={};return""!==l&&(a.resourcesUrl=new URL(".",l).href),e(a)})().then((async e=>(await a(),l([["p-7e466156",[[257,"gux-visualization-beta",{visualizationSpec:[16,"visualization-spec"],embedOptions:[16,"embed-options"],screenreaderDescription:[1,"screenreader-description"]}]]],["p-ca49d283",[[257,"gux-chart-column-beta",{labelColor:[1,"label-color"],domainColor:[1,"domain-color"],chartData:[16,"chart-data"],xTickLabelSlant:[4,"x-tick-label-slant"],includeLegend:[4,"include-legend"],xFieldName:[1,"x-field-name"],yFieldName:[1,"y-field-name"],xAxisTitle:[1,"x-axis-title"],yAxisTitle:[1,"y-axis-title"],legendTitle:[1,"legend-title"],legendPosition:[1,"legend-position"],chartLayers:[16,"chart-layers"],embedOptions:[16,"embed-options"]},null,{chartData:["parseData"]}]]],["p-114a72f3",[[257,"gux-chart-donut-beta",{chartData:[16,"chart-data"],includeLegend:[4,"include-legend"],legendPosition:[1,"legend-position"],legendTitle:[1,"legend-title"],colorFieldName:[1,"color-field-name"],outerRadius:[2,"outer-radius"],innerRadius:[2,"inner-radius"],labelRadius:[2,"label-radius"],labelField:[1,"label-field"],gauge:[4],centerText:[1,"center-text"],centerSubText:[1,"center-sub-text"],showTooltip:[4,"show-tooltip"],tooltipOptions:[16,"tooltip-options"],legendX:[2,"legend-x"],legendY:[2,"legend-y"],legendFontSize:[2,"legend-font-size"],legendSymbolSize:[2,"legend-symbol-size"],embedOptions:[16,"embed-options"]},null,{chartData:["parseData"]}]]],["p-b43d40db",[[257,"gux-chart-line-beta",{labelColor:[1,"label-color"],domainColor:[1,"domain-color"],chartData:[16,"chart-data"],xTickLabelSlant:[4,"x-tick-label-slant"],includeLegend:[4,"include-legend"],legendPosition:[1,"legend-position"],includeDataPointMarkers:[4,"include-data-point-markers"],xFieldName:[1,"x-field-name"],xAxisTitle:[1,"x-axis-title"],yFieldName:[1,"y-field-name"],yAxisTitle:[1,"y-axis-title"],legendTitle:[1,"legend-title"],colorFieldName:[1,"color-field-name"],strokeDash:[4,"stroke-dash"],interpolation:[1],embedOptions:[16,"embed-options"]},null,{chartData:["parseData"]}]]],["p-9528a3dd",[[257,"gux-chart-pie-beta",{chartData:[16,"chart-data"],includeLegend:[4,"include-legend"],legendPosition:[1,"legend-position"],legendTitle:[1,"legend-title"],colorFieldName:[1,"color-field-name"],outerRadius:[2,"outer-radius"],labelRadius:[2,"label-radius"],labelField:[1,"label-field"],embedOptions:[16,"embed-options"]},null,{chartData:["parseData"]}]]],["p-f8838ad4",[[257,"gux-chart-scatter-plot-beta",{labelColor:[1,"label-color"],domainColor:[1,"domain-color"],chartData:[16,"chart-data"],xTickLabelSlant:[4,"x-tick-label-slant"],includeLegend:[4,"include-legend"],legendPosition:[1,"legend-position"],xFieldName:[1,"x-field-name"],xAxisTitle:[1,"x-axis-title"],yFieldName:[1,"y-field-name"],yAxisTitle:[1,"y-axis-title"],legendTitle:[1,"legend-title"],colorFieldName:[1,"color-field-name"],useShape:[1,"use-shape"],embedOptions:[16,"embed-options"]},null,{chartData:["parseData"]}]]]],e))));
@@ -1 +1 @@
1
- import{r as t,h as e,g as i}from"./p-DohbbG4E.js";import{V as a,t as s}from"./p-D12bQZpc.js";import{l as n}from"./p-nsqlWzyl.js";const r="category",h="value",l=class{constructor(e){t(this,e),this.baseChartSpec={$schema:"https://vega.github.io/schema/vega-lite/v5.json",config:{legend:{symbolType:"circle"}},encoding:{theta:{field:"value",type:"quantitative",stack:!0},color:{field:r,type:"nominal",scale:{range:a},legend:null}},layer:[{mark:{type:"arc",outerRadius:80}},{mark:{type:"text",radius:90},encoding:{text:{field:h,type:"quantitative"}}}],view:{stroke:null}},this.legendPosition="right",this.showTooltip=!0}parseData(){this.outerRadius||this.innerRadius||n(this.root,"requires at least one of outer-radius or inner-radius");let t={};this.chartData&&(t={data:this.chartData}),this.legendPosition&&(this.baseChartSpec.config.legend.orient=this.legendPosition),this.includeLegend?(this.baseChartSpec.encoding.color.legend={},(this.legendX||this.legendY)&&(this.baseChartSpec.config.legend.orient="none",this.legendX&&(this.baseChartSpec.encoding.color.legend.legendX=this.legendX),this.legendY&&(this.baseChartSpec.encoding.color.legend.legendY=this.legendY)),this.legendFontSize&&(this.baseChartSpec.encoding.color.legend.labelFontSize=this.legendFontSize),this.legendSymbolSize&&(this.baseChartSpec.encoding.color.legend.symbolSize=this.legendSymbolSize)):this.baseChartSpec.encoding.color.legend=null,this.baseChartSpec.encoding.color.field=this.colorFieldName||r;this.baseChartSpec.encoding.color.title=this.legendTitle||"";let e=this.outerRadius,i=this.innerRadius;e||(e=i+32),i||(i=e-32);let a=1;this.gauge?(this.baseChartSpec.layer=[{data:{values:[{progress:"default",value:100}]},mark:{type:"arc",innerRadius:i},encoding:{theta:{field:"value",type:"quantitative"},color:{value:"#E4E9F0"},tooltip:null}},{mark:{type:"arc",outerRadius:e,innerRadius:i,padAngle:.01}},{mark:{type:"arc",innerRadius:i,padAngle:.01}}],a=2):this.baseChartSpec.layer=[{mark:{type:"arc",outerRadius:e,innerRadius:i}},{mark:{type:"arc",innerRadius:i,stroke:"#fff"}}];const s=this.centerText;s&&this.baseChartSpec.layer.push({data:{values:[{centerText:s,value:0}]},mark:{align:"center",type:"text",baseline:"middle"},encoding:{color:{value:"#4C5054"},text:{field:"centerText"},size:{value:{expr:"height * 0.09"}},tooltip:null}});const l=this.centerSubText;l&&this.baseChartSpec.layer.push({data:{values:[{centerSubText:l,value:0}]},mark:{align:"center",type:"text",baseline:"middle",y:{expr:"height/2 + 20"}},encoding:{color:{value:"#6A6D70"},text:{field:"centerSubText"},size:{value:{expr:"height * 0.06"}},tooltip:null}});const o=this.labelRadius,u=this.labelField||h;o&&this.baseChartSpec.layer.push({mark:{type:"text",radius:o},encoding:{text:{field:u,type:"quantitative"}}}),this.showTooltip&&(this.tooltipOptions?(this.baseChartSpec.layer[a].mark.tooltip={content:"data"},this.tooltipSpec={actions:!1,tooltip:this.tooltipOptions}):this.baseChartSpec.encoding.tooltip={field:u,aggregate:"count",type:"quantitative"});const c=Object.assign(this.baseChartSpec,t);this.visualizationSpec=c}componentWillLoad(){s(this.root),this.parseData()}render(){return e("gux-visualization-beta",{key:"1841c32ed4312b87b8bdeca52a007a6905effce9",visualizationSpec:this.visualizationSpec,embedOptions:this.tooltipSpec})}get root(){return i(this)}static get watchers(){return{chartData:["parseData"]}}};l.style="gux-visualization-beta{height:fit-content;color:#2e394c}";export{l as gux_chart_donut_beta}
1
+ import{r as t,h as e,g as i}from"./p-DohbbG4E.js";import{V as a,t as s}from"./p-wRl9qA4f.js";import{l as n}from"./p-nsqlWzyl.js";const r="category",h="value",l=class{constructor(e){t(this,e),this.baseChartSpec={$schema:"https://vega.github.io/schema/vega-lite/v5.json",config:{legend:{symbolType:"circle"}},encoding:{theta:{field:"value",type:"quantitative",stack:!0},color:{field:r,type:"nominal",scale:{range:a},legend:null}},layer:[{mark:{type:"arc",outerRadius:80}},{mark:{type:"text",radius:90},encoding:{text:{field:h,type:"quantitative"}}}],view:{stroke:null}},this.legendPosition="right",this.showTooltip=!0}parseData(){this.outerRadius||this.innerRadius||n(this.root,"requires at least one of outer-radius or inner-radius");let t={};this.chartData&&(t={data:this.chartData}),this.legendPosition&&(this.baseChartSpec.config.legend.orient=this.legendPosition),this.includeLegend?(this.baseChartSpec.encoding.color.legend={},(this.legendX||this.legendY)&&(this.baseChartSpec.config.legend.orient="none",this.legendX&&(this.baseChartSpec.encoding.color.legend.legendX=this.legendX),this.legendY&&(this.baseChartSpec.encoding.color.legend.legendY=this.legendY)),this.legendFontSize&&(this.baseChartSpec.encoding.color.legend.labelFontSize=this.legendFontSize),this.legendSymbolSize&&(this.baseChartSpec.encoding.color.legend.symbolSize=this.legendSymbolSize)):this.baseChartSpec.encoding.color.legend=null,this.baseChartSpec.encoding.color.field=this.colorFieldName||r;this.baseChartSpec.encoding.color.title=this.legendTitle||"";let e=this.outerRadius,i=this.innerRadius;e||(e=i+32),i||(i=e-32);let a=1;this.gauge?(this.baseChartSpec.layer=[{data:{values:[{progress:"default",value:100}]},mark:{type:"arc",innerRadius:i},encoding:{theta:{field:"value",type:"quantitative"},color:{value:"#E4E9F0"},tooltip:null}},{mark:{type:"arc",outerRadius:e,innerRadius:i,padAngle:.01}},{mark:{type:"arc",innerRadius:i,padAngle:.01}}],a=2):this.baseChartSpec.layer=[{mark:{type:"arc",outerRadius:e,innerRadius:i}},{mark:{type:"arc",innerRadius:i,stroke:"#fff"}}];const s=this.centerText;s&&this.baseChartSpec.layer.push({data:{values:[{centerText:s,value:0}]},mark:{align:"center",type:"text",baseline:"middle"},encoding:{color:{value:"#4C5054"},text:{field:"centerText"},size:{value:{expr:"height * 0.09"}},tooltip:null}});const l=this.centerSubText;l&&this.baseChartSpec.layer.push({data:{values:[{centerSubText:l,value:0}]},mark:{align:"center",type:"text",baseline:"middle",y:{expr:"height/2 + 20"}},encoding:{color:{value:"#6A6D70"},text:{field:"centerSubText"},size:{value:{expr:"height * 0.06"}},tooltip:null}});const o=this.labelRadius,u=this.labelField||h;o&&this.baseChartSpec.layer.push({mark:{type:"text",radius:o},encoding:{text:{field:u,type:"quantitative"}}}),this.showTooltip&&(this.tooltipOptions?(this.baseChartSpec.layer[a].mark.tooltip={content:"data"},this.tooltipSpec={actions:!1,tooltip:this.tooltipOptions}):this.baseChartSpec.encoding.tooltip={field:u,aggregate:"count",type:"quantitative"});const c=Object.assign(this.baseChartSpec,t);this.visualizationSpec=c}componentWillLoad(){s(this.root),this.parseData()}render(){return e("gux-visualization-beta",{key:"1841c32ed4312b87b8bdeca52a007a6905effce9",visualizationSpec:this.visualizationSpec,embedOptions:this.tooltipSpec})}get root(){return i(this)}static get watchers(){return{chartData:["parseData"]}}};l.style="gux-visualization-beta{height:fit-content;color:#2e394c}";export{l as gux_chart_donut_beta}