@carbon/charts 0.30.23 → 0.30.24

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.
@@ -19,7 +19,7 @@ import { select, mouse } from "d3-selection";
19
19
  // Carbon position service
20
20
  import Position, { PLACEMENTS } from "@carbon/utils-position";
21
21
  // import the settings for the css prefix
22
- import settings from "carbon-components/src/globals/js/settings";
22
+ import settings from "carbon-components/es/globals/js/settings";
23
23
  import { formatTick, computeTimeIntervalName } from "../../services/time-series";
24
24
  var Threshold = /** @class */ (function (_super) {
25
25
  __extends(Threshold, _super);
@@ -1 +1 @@
1
- {"version":3,"file":"threshold.js","sourceRoot":"","sources":["threshold.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACrE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAE7C,0BAA0B;AAC1B,OAAO,QAAQ,EAAE,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAE9D,yCAAyC;AACzC,OAAO,QAAQ,MAAM,2CAA2C,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAEjF;IAA+B,6BAAS;IAWvC,mBAAY,KAAiB,EAAE,QAAa,EAAE,OAAY;QAA1D,YACC,kBAAM,KAAK,EAAE,QAAQ,EAAE,OAAO,CAAC,SAC/B;QAZD,UAAI,GAAG,WAAW,CAAC;QAQnB,qBAAe,GAAG,IAAI,QAAQ,EAAE,CAAC;;IAIjC,CAAC;IAED,0BAAM,GAAN,UAAO,OAAe;QAAtB,iBAmEC;QAnEM,wBAA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EAAE;YACzB,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;YACvC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,EAAE;gBACzD,cAAc,EAAE,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC;aACtC,CAAC,CAAC;QACL,CAAC,CAAC;aACD,EAAE,CAAC,UAAU,EAAE;YACd,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;YACxC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,EAAE;gBACzD,cAAc,EAAE,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC;aACtC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;IACF,gBAAC;AAAD,CAAC,AA3KD,CAA+B,SAAS,GA2KvC","sourcesContent":["import { Component } from \"../component\";\nimport { Tools } from \"../../tools\";\nimport { DOMUtils } from \"../../services\";\nimport { ChartModel } from \"../../model\";\nimport { AxisPositions, Events, ScaleTypes } from \"../../interfaces\";\nimport { select, mouse } from \"d3-selection\";\n\n// Carbon position service\nimport Position, { PLACEMENTS } from \"@carbon/utils-position\";\n\n// import the settings for the css prefix\nimport settings from \"carbon-components/src/globals/js/settings\";\nimport { formatTick, computeTimeIntervalName } from \"../../services/time-series\";\n\nexport class Threshold extends Component {\n\ttype = \"threshold\";\n\n\tthreshold: any;\n\tthresholdClass: string;\n\tthresholdIdentifierClass: string;\n\n\tlabel: any;\n\n\tpositionService = new Position();\n\n\tconstructor(model: ChartModel, services: any, configs: any) {\n\t\tsuper(model, services, configs);\n\t}\n\n\trender(animate = false) {\n\t\tconst { value, fillColor, axisPosition, index } = this.configs;\n\t\tconst chartprefix = Tools.getProperty(this.model.getOptions(), \"style\", \"prefix\");\n\t\tthis.thresholdClass = `${settings.prefix}--${chartprefix}--threshold`;\n\t\t// We can have multiple thresholds, set an unique identifier\n\t\tthis.thresholdIdentifierClass = `${axisPosition}-${index}`;\n\n\t\tthis.threshold = DOMUtils.appendOrSelect(this.parent, `g.${this.thresholdClass}.${this.thresholdIdentifierClass}`).raise();\n\t\t// Append threshold hoverable area\n\t\tconst thresholdRect = DOMUtils.appendOrSelect(this.threshold, `rect.threshold-hoverable-area`);\n\t\t// Append threshold line\n\t\tconst thresholdLine = DOMUtils.appendOrSelect(this.threshold, `line.threshold-line`);\n\n\t\t// Set threshold line color from configs options\n\t\t// If not defined, the line takes the defined CSS color\n\t\tthresholdLine.style(\"stroke\", fillColor);\n\n\t\tconst scale = this.services.cartesianScales.getScaleByPosition(axisPosition);\n\t\tconst isVertical = [AxisPositions.LEFT, AxisPositions.RIGHT].includes(axisPosition);\n\t\tconst scaleType = this.services.cartesianScales.getScaleTypeByPosition(axisPosition);\n\t\tconst mainXScale = this.services.cartesianScales.getMainXScale();\n\t\tconst mainYScale = this.services.cartesianScales.getMainYScale();\n\t\tconst isScaleTypeLabels = scaleType === ScaleTypes.LABELS;\n\t\tconst [xScaleStart, xScaleEnd] = mainXScale.range();\n\t\tconst [yScaleEnd, yScaleStart] = mainYScale.range();\n\n\t\tif (isVertical) {\n\t\t\t// Position the threshold on the y scale value\n\t\t\tconst y = scale(value) + (isScaleTypeLabels ? (scale.step() / 2) : 0);\n\t\t\tthis.threshold\n\t\t\t\t.transition(this.services.transitions.getTransition(\"threshold-update\", animate))\n\t\t\t\t.attr(\"transform\", `translate(${xScaleStart}, ${y})`);\n\t\t\t// Set line end point on the x-axis\n\t\t\tthresholdLine.attr(\"x2\", xScaleEnd - xScaleStart);\n\t\t\t// Set hoverable area width\n\t\t\tthresholdRect.attr(\"width\", xScaleEnd - xScaleStart);\n\t\t} else {\n\t\t\t// Position the threshold on the x scale value\n\t\t\tconst x = scale(value) + (isScaleTypeLabels ? (scale.step() / 2) : 0);\n\t\t\tthis.threshold\n\t\t\t\t.transition(this.services.transitions.getTransition(\"threshold-update\", animate))\n\t\t\t\t.attr(\"transform\", `translate(${x}, ${yScaleStart})`);\n\t\t\t// Set line end point on the y-axis\n\t\t\tthresholdLine.attr(\"y2\", yScaleEnd - yScaleStart);\n\t\t\t// Set hoverable area width and rotate it\n\t\t\tthresholdRect.attr(\"width\", yScaleEnd - yScaleStart);\n\t\t\tthresholdRect.classed(\"rotate\", true);\n\t\t}\n\n\t\tconst self = this;\n\t\tthis.services.events.addEventListener(Events.Threshold.SHOW, e => {\n\t\t\tconst hovered = e.detail.hoveredElement.node();\n\t\t\t// If is this threshold\n\t\t\tif (hovered === self.threshold) {\n\t\t\t\t// Set label position and show it\n\t\t\t\tthis.setThresholdLabelPosition();\n\t\t\t\tthis.label.classed(\"hidden\", false);\n\t\t\t}\n\t\t});\n\n\t\tthis.services.events.addEventListener(Events.Threshold.HIDE, e => {\n\t\t\tthis.label.classed(\"hidden\", true);\n\t\t});\n\n\t\tthis.appendThresholdLabel();\n\n\t\tthis.addEventListeners();\n\t}\n\n\tgetFormattedValue() {\n\t\tconst { value, axisPosition } = this.configs;\n\t\tconst options = this.model.getOptions();\n\t\tconst scaleType = this.services.cartesianScales.getScaleTypeByPosition(axisPosition);\n\n\t\t// If scale is time, format the threshold date as the ticks format\n\t\tif (scaleType === ScaleTypes.TIME) {\n\t\t\tconst isVertical = [AxisPositions.LEFT, AxisPositions.RIGHT].includes(axisPosition);\n\t\t\tconst mainXScale = this.services.cartesianScales.getMainXScale();\n\t\t\tconst mainYScale = this.services.cartesianScales.getMainYScale();\n\t\t\tconst scale = isVertical ? mainYScale : mainXScale;\n\n\t\t\tconst timeScaleOptions = Tools.getProperty(options, \"timeScale\");\n\t\t\tconst timeInterval = computeTimeIntervalName(scale.ticks());\n\t\t\treturn formatTick(value, 0, timeInterval, timeScaleOptions);\n\t\t}\n\n\t\treturn value.toLocaleString(\"en\");\n\t}\n\n\tappendThresholdLabel() {\n\t\tconst { value, valueFormatter, fillColor, label = \"Threshold\" } = this.configs;\n\t\tconst holder = select(this.services.domUtils.getHolder());\n\t\t// Format the threshold value using valueFormatter if defined in user-provided options\n\t\tconst formattedValue = valueFormatter ? valueFormatter(value) : this.getFormattedValue();\n\n\t\tthis.label = DOMUtils.appendOrSelect(holder, `div.${this.thresholdClass}--label.${this.thresholdIdentifierClass}`);\n\t\tthis.label.html(`${label}: ${formattedValue}`)\n\t\t\t.classed(\"hidden\", true)\n\t\t\t.style(\"background-color\", fillColor);\n\t}\n\n\tsetThresholdLabelPosition() {\n\t\tconst holder = this.services.domUtils.getHolder();\n\t\tconst target = this.label.node();\n\t\tconst mouseRelativePos = mouse(holder);\n\n\t\t// Find out whether threshold label should be shown on the left or right side\n\t\tconst bestPlacementOption = this.positionService.findBestPlacementAt(\n\t\t\t{\n\t\t\t\tleft: mouseRelativePos[0],\n\t\t\t\ttop: mouseRelativePos[1]\n\t\t\t},\n\t\t\ttarget,\n\t\t\t[\n\t\t\t\tPLACEMENTS.RIGHT,\n\t\t\t\tPLACEMENTS.LEFT,\n\t\t\t\tPLACEMENTS.TOP,\n\t\t\t\tPLACEMENTS.BOTTOM\n\t\t\t],\n\t\t\t() => ({\n\t\t\t\twidth: holder.offsetWidth,\n\t\t\t\theight: holder.offsetHeight\n\t\t\t})\n\t\t);\n\n\t\t// Get coordinates to where label should be positioned\n\t\tconst pos = this.positionService.findPositionAt(\n\t\t\t{\n\t\t\t\tleft: mouseRelativePos[0],\n\t\t\t\ttop: mouseRelativePos[1]\n\t\t\t},\n\t\t\ttarget,\n\t\t\tbestPlacementOption\n\t\t);\n\n\t\tthis.positionService.setElement(target, pos);\n\t}\n\n\taddEventListeners() {\n\t\tconst self = this;\n\n\t\t// Add events to the threshold hoverable area\n\t\tDOMUtils.appendOrSelect(this.threshold, \"rect\")\n\t\t\t.on(\"mouseover mousemove\", function() {\n\t\t\t\t\tself.threshold.classed(\"active\", true);\n\t\t\t\t\tself.services.events.dispatchEvent(Events.Threshold.SHOW, {\n\t\t\t\t\t\thoveredElement: select(self.threshold)\n\t\t\t\t\t});\n\t\t\t})\n\t\t\t.on(\"mouseout\", function() {\n\t\t\t\t\tself.threshold.classed(\"active\", false);\n\t\t\t\t\tself.services.events.dispatchEvent(Events.Threshold.HIDE, {\n\t\t\t\t\t\thoveredElement: select(self.threshold)\n\t\t\t\t\t});\n\t\t\t});\n\t}\n}\n"]}
1
+ {"version":3,"file":"threshold.js","sourceRoot":"","sources":["threshold.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACrE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAE7C,0BAA0B;AAC1B,OAAO,QAAQ,EAAE,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAE9D,yCAAyC;AACzC,OAAO,QAAQ,MAAM,0CAA0C,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAEjF;IAA+B,6BAAS;IAWvC,mBAAY,KAAiB,EAAE,QAAa,EAAE,OAAY;QAA1D,YACC,kBAAM,KAAK,EAAE,QAAQ,EAAE,OAAO,CAAC,SAC/B;QAZD,UAAI,GAAG,WAAW,CAAC;QAQnB,qBAAe,GAAG,IAAI,QAAQ,EAAE,CAAC;;IAIjC,CAAC;IAED,0BAAM,GAAN,UAAO,OAAe;QAAtB,iBAmEC;QAnEM,wBAAA,EAAA,eAAe;QACf,IAAA,iBAAwD,EAAtD,gBAAK,EAAE,wBAAS,EAAE,8BAAY,EAAE,gBAAsB,CAAC;QAC/D,IAAM,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC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AC,IAAI,EAAE;gBACzD,cAAc,EAAE,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC;aACtC,CAAC,CAAC;QACL,CAAC,CAAC;aACD,EAAE,CAAC,UAAU,EAAE;YACd,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;YACxC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,EAAE;gBACzD,cAAc,EAAE,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC;aACtC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;IACF,gBAAC;AAAD,CAAC,AA3KD,CAA+B,SAAS,GA2KvC","sourcesContent":["import { Component } from \"../component\";\nimport { Tools } from \"../../tools\";\nimport { DOMUtils } from \"../../services\";\nimport { ChartModel } from \"../../model\";\nimport { AxisPositions, Events, ScaleTypes } from \"../../interfaces\";\nimport { select, mouse } from \"d3-selection\";\n\n// Carbon position service\nimport Position, { PLACEMENTS } from \"@carbon/utils-position\";\n\n// import the settings for the css prefix\nimport settings from \"carbon-components/es/globals/js/settings\";\nimport { formatTick, computeTimeIntervalName } from \"../../services/time-series\";\n\nexport class Threshold extends Component {\n\ttype = \"threshold\";\n\n\tthreshold: any;\n\tthresholdClass: string;\n\tthresholdIdentifierClass: string;\n\n\tlabel: any;\n\n\tpositionService = new Position();\n\n\tconstructor(model: ChartModel, services: any, configs: any) {\n\t\tsuper(model, services, configs);\n\t}\n\n\trender(animate = false) {\n\t\tconst { value, fillColor, axisPosition, index } = this.configs;\n\t\tconst chartprefix = Tools.getProperty(this.model.getOptions(), \"style\", \"prefix\");\n\t\tthis.thresholdClass = `${settings.prefix}--${chartprefix}--threshold`;\n\t\t// We can have multiple thresholds, set an unique identifier\n\t\tthis.thresholdIdentifierClass = `${axisPosition}-${index}`;\n\n\t\tthis.threshold = DOMUtils.appendOrSelect(this.parent, `g.${this.thresholdClass}.${this.thresholdIdentifierClass}`).raise();\n\t\t// Append threshold hoverable area\n\t\tconst thresholdRect = DOMUtils.appendOrSelect(this.threshold, `rect.threshold-hoverable-area`);\n\t\t// Append threshold line\n\t\tconst thresholdLine = DOMUtils.appendOrSelect(this.threshold, `line.threshold-line`);\n\n\t\t// Set threshold line color from configs options\n\t\t// If not defined, the line takes the defined CSS color\n\t\tthresholdLine.style(\"stroke\", fillColor);\n\n\t\tconst scale = this.services.cartesianScales.getScaleByPosition(axisPosition);\n\t\tconst isVertical = [AxisPositions.LEFT, AxisPositions.RIGHT].includes(axisPosition);\n\t\tconst scaleType = this.services.cartesianScales.getScaleTypeByPosition(axisPosition);\n\t\tconst mainXScale = this.services.cartesianScales.getMainXScale();\n\t\tconst mainYScale = this.services.cartesianScales.getMainYScale();\n\t\tconst isScaleTypeLabels = scaleType === ScaleTypes.LABELS;\n\t\tconst [xScaleStart, xScaleEnd] = mainXScale.range();\n\t\tconst [yScaleEnd, yScaleStart] = mainYScale.range();\n\n\t\tif (isVertical) {\n\t\t\t// Position the threshold on the y scale value\n\t\t\tconst y = scale(value) + (isScaleTypeLabels ? (scale.step() / 2) : 0);\n\t\t\tthis.threshold\n\t\t\t\t.transition(this.services.transitions.getTransition(\"threshold-update\", animate))\n\t\t\t\t.attr(\"transform\", `translate(${xScaleStart}, ${y})`);\n\t\t\t// Set line end point on the x-axis\n\t\t\tthresholdLine.attr(\"x2\", xScaleEnd - xScaleStart);\n\t\t\t// Set hoverable area width\n\t\t\tthresholdRect.attr(\"width\", xScaleEnd - xScaleStart);\n\t\t} else {\n\t\t\t// Position the threshold on the x scale value\n\t\t\tconst x = scale(value) + (isScaleTypeLabels ? (scale.step() / 2) : 0);\n\t\t\tthis.threshold\n\t\t\t\t.transition(this.services.transitions.getTransition(\"threshold-update\", animate))\n\t\t\t\t.attr(\"transform\", `translate(${x}, ${yScaleStart})`);\n\t\t\t// Set line end point on the y-axis\n\t\t\tthresholdLine.attr(\"y2\", yScaleEnd - yScaleStart);\n\t\t\t// Set hoverable area width and rotate it\n\t\t\tthresholdRect.attr(\"width\", yScaleEnd - yScaleStart);\n\t\t\tthresholdRect.classed(\"rotate\", true);\n\t\t}\n\n\t\tconst self = this;\n\t\tthis.services.events.addEventListener(Events.Threshold.SHOW, e => {\n\t\t\tconst hovered = e.detail.hoveredElement.node();\n\t\t\t// If is this threshold\n\t\t\tif (hovered === self.threshold) {\n\t\t\t\t// Set label position and show it\n\t\t\t\tthis.setThresholdLabelPosition();\n\t\t\t\tthis.label.classed(\"hidden\", false);\n\t\t\t}\n\t\t});\n\n\t\tthis.services.events.addEventListener(Events.Threshold.HIDE, e => {\n\t\t\tthis.label.classed(\"hidden\", true);\n\t\t});\n\n\t\tthis.appendThresholdLabel();\n\n\t\tthis.addEventListeners();\n\t}\n\n\tgetFormattedValue() {\n\t\tconst { value, axisPosition } = this.configs;\n\t\tconst options = this.model.getOptions();\n\t\tconst scaleType = this.services.cartesianScales.getScaleTypeByPosition(axisPosition);\n\n\t\t// If scale is time, format the threshold date as the ticks format\n\t\tif (scaleType === ScaleTypes.TIME) {\n\t\t\tconst isVertical = [AxisPositions.LEFT, AxisPositions.RIGHT].includes(axisPosition);\n\t\t\tconst mainXScale = this.services.cartesianScales.getMainXScale();\n\t\t\tconst mainYScale = this.services.cartesianScales.getMainYScale();\n\t\t\tconst scale = isVertical ? mainYScale : mainXScale;\n\n\t\t\tconst timeScaleOptions = Tools.getProperty(options, \"timeScale\");\n\t\t\tconst timeInterval = computeTimeIntervalName(scale.ticks());\n\t\t\treturn formatTick(value, 0, timeInterval, timeScaleOptions);\n\t\t}\n\n\t\treturn value.toLocaleString(\"en\");\n\t}\n\n\tappendThresholdLabel() {\n\t\tconst { value, valueFormatter, fillColor, label = \"Threshold\" } = this.configs;\n\t\tconst holder = select(this.services.domUtils.getHolder());\n\t\t// Format the threshold value using valueFormatter if defined in user-provided options\n\t\tconst formattedValue = valueFormatter ? valueFormatter(value) : this.getFormattedValue();\n\n\t\tthis.label = DOMUtils.appendOrSelect(holder, `div.${this.thresholdClass}--label.${this.thresholdIdentifierClass}`);\n\t\tthis.label.html(`${label}: ${formattedValue}`)\n\t\t\t.classed(\"hidden\", true)\n\t\t\t.style(\"background-color\", fillColor);\n\t}\n\n\tsetThresholdLabelPosition() {\n\t\tconst holder = this.services.domUtils.getHolder();\n\t\tconst target = this.label.node();\n\t\tconst mouseRelativePos = mouse(holder);\n\n\t\t// Find out whether threshold label should be shown on the left or right side\n\t\tconst bestPlacementOption = this.positionService.findBestPlacementAt(\n\t\t\t{\n\t\t\t\tleft: mouseRelativePos[0],\n\t\t\t\ttop: mouseRelativePos[1]\n\t\t\t},\n\t\t\ttarget,\n\t\t\t[\n\t\t\t\tPLACEMENTS.RIGHT,\n\t\t\t\tPLACEMENTS.LEFT,\n\t\t\t\tPLACEMENTS.TOP,\n\t\t\t\tPLACEMENTS.BOTTOM\n\t\t\t],\n\t\t\t() => ({\n\t\t\t\twidth: holder.offsetWidth,\n\t\t\t\theight: holder.offsetHeight\n\t\t\t})\n\t\t);\n\n\t\t// Get coordinates to where label should be positioned\n\t\tconst pos = this.positionService.findPositionAt(\n\t\t\t{\n\t\t\t\tleft: mouseRelativePos[0],\n\t\t\t\ttop: mouseRelativePos[1]\n\t\t\t},\n\t\t\ttarget,\n\t\t\tbestPlacementOption\n\t\t);\n\n\t\tthis.positionService.setElement(target, pos);\n\t}\n\n\taddEventListeners() {\n\t\tconst self = this;\n\n\t\t// Add events to the threshold hoverable area\n\t\tDOMUtils.appendOrSelect(this.threshold, \"rect\")\n\t\t\t.on(\"mouseover mousemove\", function() {\n\t\t\t\t\tself.threshold.classed(\"active\", true);\n\t\t\t\t\tself.services.events.dispatchEvent(Events.Threshold.SHOW, {\n\t\t\t\t\t\thoveredElement: select(self.threshold)\n\t\t\t\t\t});\n\t\t\t})\n\t\t\t.on(\"mouseout\", function() {\n\t\t\t\t\tself.threshold.classed(\"active\", false);\n\t\t\t\t\tself.services.events.dispatchEvent(Events.Threshold.HIDE, {\n\t\t\t\t\t\thoveredElement: select(self.threshold)\n\t\t\t\t\t});\n\t\t\t});\n\t}\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@carbon/charts",
3
- "version": "0.30.23",
3
+ "version": "0.30.24",
4
4
  "description": "Carbon charting components",
5
5
  "main": "./bundle.js",
6
6
  "module": "./index.js",
@@ -354,7 +354,7 @@
354
354
  "signature": "eb54911c12f48e12aa80629820f950fae337794d14c87a77815e1f9466dcf748"
355
355
  },
356
356
  "../src/components/essentials/threshold.ts": {
357
- "version": "c179c67ae2d86e40c4c26a1eaea926e76090e556a33236907c92d2eea2e0b7b2",
357
+ "version": "03d5b4bf40ca3fec9902a03a275077204f5ecee58aa0a662f3d17a29013332e4",
358
358
  "signature": "e089a48fc5bc155db4eea756f455d6a6ffdeeec2b4febdfad870b34dbf819c14"
359
359
  },
360
360
  "../src/components/essentials/title.ts": {