highcharts 12.0.2 → 12.1.0
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/bower.json +1 -1
- package/es-modules/Accessibility/Options/A11yDefaults.js +2 -0
- package/es-modules/Core/Color/Color.js +5 -12
- package/es-modules/Core/Renderer/HTML/HTMLElement.js +1 -3
- package/es-modules/Core/Renderer/SVG/SVGElement.js +3 -1
- package/es-modules/Core/Renderer/SVG/SVGLabel.js +8 -11
- package/es-modules/Core/Series/DataLabel.js +3 -1
- package/es-modules/Core/Series/Series.js +13 -15
- package/es-modules/Core/Templating.js +14 -10
- package/es-modules/Core/Time.js +6 -3
- package/es-modules/Core/Utilities.js +1 -1
- package/es-modules/Data/Converters/CSVConverter.js +1 -0
- package/es-modules/Data/Converters/DataConverter.js +31 -0
- package/es-modules/Data/Converters/GoogleSheetsConverter.js +1 -0
- package/es-modules/Data/Converters/HTMLTableConverter.js +1 -0
- package/es-modules/Data/Converters/JSONConverter.js +1 -0
- package/es-modules/Extensions/Boost/BoostSeries.js +13 -7
- package/es-modules/Extensions/DragPanes/AxisResizer.js +1 -1
- package/es-modules/Extensions/SeriesLabel/SeriesLabelDefaults.js +7 -2
- package/es-modules/Series/Bubble/BubbleSeries.js +24 -0
- package/es-modules/Series/Organization/OrganizationSeriesDefaults.js +3 -1
- package/es-modules/Series/Timeline/TimelineSeriesDefaults.js +3 -1
- package/es-modules/Series/Treegraph/TreegraphSeriesDefaults.js +3 -1
- package/es-modules/Series/Treemap/TreemapPoint.js +7 -2
- package/es-modules/Series/Treemap/TreemapSeries.js +154 -53
- package/es-modules/Series/Treemap/TreemapSeriesDefaults.js +126 -4
- package/es-modules/Stock/Indicators/VBP/VBPIndicator.js +1 -0
- package/es-modules/Stock/RangeSelector/RangeSelector.js +68 -72
- package/es-modules/Stock/RangeSelector/RangeSelectorDefaults.js +10 -4
- package/es-modules/masters/indicators/indicators-all.src.js +4 -0
- package/es-modules/tsconfig.tsbuildinfo +1 -1
- package/highcharts-3d.js +2 -2
- package/highcharts-3d.src.js +1 -1
- package/highcharts-gantt.js +5 -5
- package/highcharts-gantt.src.js +140 -141
- package/highcharts-more.js +2 -2
- package/highcharts-more.src.js +25 -1
- package/highcharts.d.ts +281 -762
- package/highcharts.js +3 -3
- package/highcharts.src.d.ts +281 -762
- package/highcharts.src.js +57 -60
- package/highmaps.js +5 -5
- package/highmaps.src.js +84 -63
- package/highstock.js +5 -5
- package/highstock.src.js +140 -141
- package/indicators/acceleration-bands.js +2 -2
- package/indicators/acceleration-bands.src.js +1 -1
- package/indicators/accumulation-distribution.js +2 -2
- package/indicators/accumulation-distribution.src.js +1 -1
- package/indicators/ao.js +2 -2
- package/indicators/ao.src.js +1 -1
- package/indicators/apo.js +2 -2
- package/indicators/apo.src.js +1 -1
- package/indicators/aroon-oscillator.js +2 -2
- package/indicators/aroon-oscillator.src.js +1 -1
- package/indicators/aroon.js +2 -2
- package/indicators/aroon.src.js +1 -1
- package/indicators/atr.js +2 -2
- package/indicators/atr.src.js +1 -1
- package/indicators/bollinger-bands.js +2 -2
- package/indicators/bollinger-bands.src.js +1 -1
- package/indicators/cci.js +2 -2
- package/indicators/cci.src.js +1 -1
- package/indicators/chaikin.js +2 -2
- package/indicators/chaikin.src.js +1 -1
- package/indicators/cmf.js +2 -2
- package/indicators/cmf.src.js +1 -1
- package/indicators/cmo.js +2 -2
- package/indicators/cmo.src.js +1 -1
- package/indicators/dema.js +2 -2
- package/indicators/dema.src.js +1 -1
- package/indicators/disparity-index.js +2 -2
- package/indicators/disparity-index.src.js +1 -1
- package/indicators/dmi.js +2 -2
- package/indicators/dmi.src.js +1 -1
- package/indicators/dpo.js +2 -2
- package/indicators/dpo.src.js +1 -1
- package/indicators/ema.js +1 -1
- package/indicators/ichimoku-kinko-hyo.js +2 -2
- package/indicators/ichimoku-kinko-hyo.src.js +1 -1
- package/indicators/indicators-all.js +2 -2
- package/indicators/indicators-all.src.js +6 -1
- package/indicators/indicators.js +2 -2
- package/indicators/indicators.src.js +1 -1
- package/indicators/keltner-channels.js +2 -2
- package/indicators/keltner-channels.src.js +1 -1
- package/indicators/klinger.js +2 -2
- package/indicators/klinger.src.js +1 -1
- package/indicators/macd.js +2 -2
- package/indicators/macd.src.js +1 -1
- package/indicators/mfi.js +2 -2
- package/indicators/mfi.src.js +1 -1
- package/indicators/momentum.js +2 -2
- package/indicators/momentum.src.js +1 -1
- package/indicators/natr.js +2 -2
- package/indicators/natr.src.js +1 -1
- package/indicators/obv.js +2 -2
- package/indicators/obv.src.js +1 -1
- package/indicators/pivot-points.js +2 -2
- package/indicators/pivot-points.src.js +1 -1
- package/indicators/ppo.js +2 -2
- package/indicators/ppo.src.js +1 -1
- package/indicators/price-channel.js +2 -2
- package/indicators/price-channel.src.js +1 -1
- package/indicators/price-envelopes.js +2 -2
- package/indicators/price-envelopes.src.js +1 -1
- package/indicators/psar.js +2 -2
- package/indicators/psar.src.js +1 -1
- package/indicators/regressions.js +2 -2
- package/indicators/regressions.src.js +1 -1
- package/indicators/roc.js +2 -2
- package/indicators/roc.src.js +1 -1
- package/indicators/rsi.js +2 -2
- package/indicators/rsi.src.js +1 -1
- package/indicators/slow-stochastic.js +2 -2
- package/indicators/slow-stochastic.src.js +1 -1
- package/indicators/stochastic.js +2 -2
- package/indicators/stochastic.src.js +1 -1
- package/indicators/supertrend.js +2 -2
- package/indicators/supertrend.src.js +1 -1
- package/indicators/tema.js +2 -2
- package/indicators/tema.src.js +1 -1
- package/indicators/trendline.js +2 -2
- package/indicators/trendline.src.js +1 -1
- package/indicators/trix.js +2 -2
- package/indicators/trix.src.js +1 -1
- package/indicators/volume-by-price.js +2 -2
- package/indicators/volume-by-price.src.js +2 -1
- package/indicators/vwap.js +2 -2
- package/indicators/vwap.src.js +1 -1
- package/indicators/williams-r.js +2 -2
- package/indicators/williams-r.src.js +1 -1
- package/indicators/wma.js +2 -2
- package/indicators/wma.src.js +1 -1
- package/indicators/zigzag.js +2 -2
- package/indicators/zigzag.src.js +1 -1
- package/modules/accessibility.js +2 -2
- package/modules/accessibility.src.js +3 -1
- package/modules/annotations-advanced.js +3 -3
- package/modules/annotations-advanced.src.js +4 -4
- package/modules/annotations.js +2 -2
- package/modules/annotations.src.js +3 -3
- package/modules/arc-diagram.js +2 -2
- package/modules/arc-diagram.src.js +1 -1
- package/modules/arrow-symbols.js +2 -2
- package/modules/arrow-symbols.src.js +1 -1
- package/modules/boost-canvas.js +2 -2
- package/modules/boost-canvas.src.js +14 -11
- package/modules/boost.js +2 -2
- package/modules/boost.src.js +14 -11
- package/modules/broken-axis.js +2 -2
- package/modules/broken-axis.src.js +1 -1
- package/modules/bullet.js +2 -2
- package/modules/bullet.src.js +1 -1
- package/modules/coloraxis.js +2 -2
- package/modules/coloraxis.src.js +1 -1
- package/modules/current-date-indicator.js +2 -2
- package/modules/current-date-indicator.src.js +1 -1
- package/modules/cylinder.js +2 -2
- package/modules/cylinder.src.js +1 -1
- package/modules/data-tools.js +2 -2
- package/modules/data-tools.src.js +36 -1
- package/modules/data.js +2 -2
- package/modules/data.src.js +1 -1
- package/modules/datagrouping.js +2 -2
- package/modules/datagrouping.src.js +1 -1
- package/modules/debugger.js +2 -2
- package/modules/debugger.src.js +1 -1
- package/modules/dependency-wheel.js +2 -2
- package/modules/dependency-wheel.src.js +1 -1
- package/modules/dotplot.js +2 -2
- package/modules/dotplot.src.js +1 -1
- package/modules/drag-panes.js +2 -2
- package/modules/drag-panes.src.js +2 -2
- package/modules/draggable-points.js +2 -2
- package/modules/draggable-points.src.js +1 -1
- package/modules/drilldown.js +2 -2
- package/modules/drilldown.src.js +1 -1
- package/modules/dumbbell.js +2 -2
- package/modules/dumbbell.src.js +1 -1
- package/modules/export-data.js +2 -2
- package/modules/export-data.src.js +1 -1
- package/modules/exporting.js +2 -2
- package/modules/exporting.src.js +1 -1
- package/modules/flowmap.js +2 -2
- package/modules/flowmap.src.js +1 -1
- package/modules/full-screen.js +2 -2
- package/modules/full-screen.src.js +1 -1
- package/modules/funnel.js +2 -2
- package/modules/funnel.src.js +1 -1
- package/modules/funnel3d.js +2 -2
- package/modules/funnel3d.src.js +1 -1
- package/modules/gantt.js +6 -6
- package/modules/gantt.src.js +82 -80
- package/modules/geoheatmap.js +2 -2
- package/modules/geoheatmap.src.js +1 -1
- package/modules/grid-axis.js +2 -2
- package/modules/grid-axis.src.js +1 -1
- package/modules/heatmap.js +3 -3
- package/modules/heatmap.src.js +2 -2
- package/modules/heikinashi.js +2 -2
- package/modules/heikinashi.src.js +1 -1
- package/modules/histogram-bellcurve.js +2 -2
- package/modules/histogram-bellcurve.src.js +1 -1
- package/modules/hollowcandlestick.js +2 -2
- package/modules/hollowcandlestick.src.js +1 -1
- package/modules/item-series.js +2 -2
- package/modules/item-series.src.js +1 -1
- package/modules/lollipop.js +2 -2
- package/modules/lollipop.src.js +1 -1
- package/modules/map.js +4 -4
- package/modules/map.src.js +26 -2
- package/modules/marker-clusters.js +2 -2
- package/modules/marker-clusters.src.js +1 -1
- package/modules/mouse-wheel-zoom.js +2 -2
- package/modules/mouse-wheel-zoom.src.js +1 -1
- package/modules/navigator.js +2 -2
- package/modules/navigator.src.js +1 -1
- package/modules/networkgraph.js +2 -2
- package/modules/networkgraph.src.js +1 -1
- package/modules/no-data-to-display.js +2 -2
- package/modules/no-data-to-display.src.js +1 -1
- package/modules/offline-exporting.js +2 -2
- package/modules/offline-exporting.src.js +2 -2
- package/modules/organization.js +2 -2
- package/modules/organization.src.js +4 -2
- package/modules/overlapping-datalabels.js +2 -2
- package/modules/overlapping-datalabels.src.js +1 -1
- package/modules/parallel-coordinates.js +2 -2
- package/modules/parallel-coordinates.src.js +1 -1
- package/modules/pareto.js +2 -2
- package/modules/pareto.src.js +1 -1
- package/modules/pathfinder.js +2 -2
- package/modules/pathfinder.src.js +1 -1
- package/modules/pattern-fill.js +2 -2
- package/modules/pattern-fill.src.js +1 -1
- package/modules/pictorial.js +2 -2
- package/modules/pictorial.src.js +1 -1
- package/modules/pointandfigure.js +2 -2
- package/modules/pointandfigure.src.js +1 -1
- package/modules/price-indicator.js +2 -2
- package/modules/price-indicator.src.js +1 -1
- package/modules/pyramid3d.js +2 -2
- package/modules/pyramid3d.src.js +1 -1
- package/modules/renko.js +2 -2
- package/modules/renko.src.js +1 -1
- package/modules/sankey.js +2 -2
- package/modules/sankey.src.js +1 -1
- package/modules/series-label.js +2 -2
- package/modules/series-label.src.js +8 -3
- package/modules/series-on-point.js +2 -2
- package/modules/series-on-point.src.js +1 -1
- package/modules/solid-gauge.js +2 -2
- package/modules/solid-gauge.src.js +1 -1
- package/modules/sonification.js +2 -2
- package/modules/sonification.src.js +1 -1
- package/modules/static-scale.js +2 -2
- package/modules/static-scale.src.js +1 -1
- package/modules/stock-tools.js +2 -2
- package/modules/stock-tools.src.js +3 -3
- package/modules/stock.js +6 -6
- package/modules/stock.src.js +82 -80
- package/modules/streamgraph.js +2 -2
- package/modules/streamgraph.src.js +1 -1
- package/modules/sunburst.js +2 -2
- package/modules/sunburst.src.js +290 -62
- package/modules/textpath.js +2 -2
- package/modules/textpath.src.js +1 -1
- package/modules/tiledwebmap.js +3 -3
- package/modules/tiledwebmap.src.js +1 -1
- package/modules/tilemap.js +2 -2
- package/modules/tilemap.src.js +1 -1
- package/modules/timeline.js +2 -2
- package/modules/timeline.src.js +4 -2
- package/modules/treegraph.js +2 -2
- package/modules/treegraph.src.js +4 -2
- package/modules/treegrid.js +2 -2
- package/modules/treegrid.src.js +1 -1
- package/modules/treemap.js +2 -2
- package/modules/treemap.src.js +288 -60
- package/modules/variable-pie.js +2 -2
- package/modules/variable-pie.src.js +1 -1
- package/modules/variwide.js +2 -2
- package/modules/variwide.src.js +1 -1
- package/modules/vector.js +2 -2
- package/modules/vector.src.js +1 -1
- package/modules/venn.js +2 -2
- package/modules/venn.src.js +1 -1
- package/modules/windbarb.js +2 -2
- package/modules/windbarb.src.js +1 -1
- package/modules/wordcloud.js +2 -2
- package/modules/wordcloud.src.js +1 -1
- package/modules/xrange.js +2 -2
- package/modules/xrange.src.js +1 -1
- package/options/treegraph.d.ts +559 -70
- package/options/treegraph.src.d.ts +559 -70
- package/options/treemap.d.ts +314 -160
- package/options/treemap.src.d.ts +314 -160
- package/options/vbp.d.ts +1 -1
- package/options/vbp.src.d.ts +1 -1
- package/package.json +1 -1
- package/standalone-navigator.js +3 -3
- package/standalone-navigator.src.js +58 -61
- package/themes/avocado.js +2 -2
- package/themes/avocado.src.js +1 -1
- package/themes/brand-dark.js +2 -2
- package/themes/brand-dark.src.js +1 -1
- package/themes/brand-light.js +2 -2
- package/themes/brand-light.src.js +1 -1
- package/themes/dark-blue.js +2 -2
- package/themes/dark-blue.src.js +1 -1
- package/themes/dark-green.js +2 -2
- package/themes/dark-green.src.js +1 -1
- package/themes/dark-unica.js +2 -2
- package/themes/dark-unica.src.js +1 -1
- package/themes/gray.js +2 -2
- package/themes/gray.src.js +1 -1
- package/themes/grid-light.js +2 -2
- package/themes/grid-light.src.js +1 -1
- package/themes/grid.js +2 -2
- package/themes/grid.src.js +1 -1
- package/themes/high-contrast-dark.js +2 -2
- package/themes/high-contrast-dark.src.js +1 -1
- package/themes/high-contrast-light.js +2 -2
- package/themes/high-contrast-light.src.js +1 -1
- package/themes/sand-signika.js +2 -2
- package/themes/sand-signika.src.js +1 -1
- package/themes/skies.js +2 -2
- package/themes/skies.src.js +1 -1
- package/themes/sunset.js +2 -2
- package/themes/sunset.src.js +1 -1
package/modules/funnel.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
!/**
|
|
2
|
-
* Highcharts JS v12.0
|
|
2
|
+
* Highcharts JS v12.1.0 (2024-12-17)
|
|
3
3
|
* @module highcharts/modules/funnel
|
|
4
4
|
* @requires highcharts
|
|
5
5
|
*
|
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
* (c) 2010-2024 Torstein Honsi
|
|
9
9
|
*
|
|
10
10
|
* License: www.highcharts.com/license
|
|
11
|
-
*/function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(t._Highcharts,t._Highcharts.SeriesRegistry):"function"==typeof define&&define.amd?define("highcharts/modules/funnel",["highcharts/highcharts"],function(t){return e(t,t.SeriesRegistry)}):"object"==typeof exports?exports["highcharts/modules/funnel"]=e(t._Highcharts,t._Highcharts.SeriesRegistry):t.Highcharts=e(t.Highcharts,t.Highcharts.SeriesRegistry)}("undefined"==typeof window?this:window,(t,e)=>(()=>{"use strict";var i={512:t=>{t.exports=e},944:e=>{e.exports=t}},a={};function d(t){var e=a[t];if(void 0!==e)return e.exports;var s=a[t]={exports:{}};return i[t](s,s.exports,d),s.exports}d.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return d.d(e,{a:e}),e},d.d=(t,e)=>{for(var i in e)d.o(e,i)&&!d.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},d.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var s={};d.d(s,{default:()=>X});var o=d(944),n
|
|
11
|
+
*/function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(t._Highcharts,t._Highcharts.SeriesRegistry):"function"==typeof define&&define.amd?define("highcharts/modules/funnel",["highcharts/highcharts"],function(t){return e(t,t.SeriesRegistry)}):"object"==typeof exports?exports["highcharts/modules/funnel"]=e(t._Highcharts,t._Highcharts.SeriesRegistry):t.Highcharts=e(t.Highcharts,t.Highcharts.SeriesRegistry)}("undefined"==typeof window?this:window,(t,e)=>(()=>{"use strict";var i={512:t=>{t.exports=e},944:e=>{e.exports=t}},a={};function d(t){var e=a[t];if(void 0!==e)return e.exports;var s=a[t]={exports:{}};return i[t](s,s.exports,d),s.exports}d.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return d.d(e,{a:e}),e},d.d=(t,e)=>{for(var i in e)d.o(e,i)&&!d.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},d.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var s={};d.d(s,{default:()=>X});var o=d(944),n=d.n(o);let{defaultOptions:r}=n(),{noop:l}=n(),{addEvent:h,extend:p,isObject:c,merge:u,relativeLength:g}=n(),x={radius:0,scope:"stack",where:void 0},y={optionsToObject:function(t,e){return c(t)||(t={radius:t||0}),u(x,e,t)}};var f=d(512),b=d.n(f);let{composed:L,noop:m}=n(),{column:v,pie:M}=b().seriesTypes,{addEvent:W,correctFloat:A,extend:C,fireEvent:H,isArray:w,merge:P,pick:k,pushUnique:O,relativeLength:S,splat:j}=n(),D=b().series.prototype.alignDataLabel;function I(t,e){return/%$/.test(t)?e*parseInt(t,10)/100:parseInt(t,10)}class T extends M{alignDataLabel(t,e,i,a,d){let s=t.series,o=s.options.reversed,n=t.dlBox||t.shapeArgs,{align:r,padding:l=0,verticalAlign:h}=i,p=((s.options||{}).dataLabels||{}).inside,c=s.center[1],u=t.plotY||0,g=e.height??e.getBBox().height,x=s.getWidthAt((o?2*c-u:u)-n.height/2+g),y="middle"===h?(n.topWidth-n.bottomWidth)/4:(x-n.bottomWidth)/2,f=n.y,b=n.x;"middle"===h?f=n.y-n.height/2+g/2:"top"===h&&(f=n.y-n.height+g+l),("top"===h&&!o||"bottom"===h&&o||"middle"===h)&&("right"===r?b=n.x-l+y:"left"===r&&(b=n.x+l-y)),a={x:b,y:o?f-n.height:f,width:n.bottomWidth,height:n.height},i.verticalAlign="bottom",p&&(i.distance=void 0),p&&t.visible&&D.call(s,t,e,i,a,d),p&&(!t.visible&&t.dataLabel&&(t.dataLabel.placed=!1),t.contrastColor&&e.css({color:t.contrastColor}))}drawDataLabels(){(j(this.options.dataLabels||{})[0].inside?v:M).prototype.drawDataLabels.call(this)}getDataLabelPosition(t,e){let i=t.plotY||0,a=t.half?1:-1,d=this.getX(i,!!t.half,t);return{distance:e,natural:{x:0,y:i},computed:{},alignment:t.half?"right":"left",connectorPosition:{breakAt:{x:d+(e-5)*a,y:i},touchingSliceAt:{x:d+e*a,y:i}}}}translate(){let t=this,e=t.chart,i=t.options,a=i.reversed,d=i.ignoreHiddenPoint,s=y.optionsToObject(i.borderRadius),o=e.plotWidth,n=e.plotHeight,r=i.center,l=I(r[0],o),h=I(r[1],n),p=I(i.width,o),c=I(i.height,n),u=I(i.neckWidth,o),g=I(i.neckHeight,n),x=h-c/2+c-g,f=t.points,b=S(s.radius,p),L=s.scope,v="left"===i.dataLabels.position?1:0,M=t=>{let e=Math.tan(t/2),i=Math.cos(j),d=Math.sin(j),s=b,o=s/e,n=Math.tan((Math.PI-t)/3.2104);return o>D&&(s=(o=D)*e),{dx:[o*i,(o-(n*=s))*i,o-n,o],dy:[o*d,(o-n)*d,o-n,o].map(t=>a?-t:t)}},W=0,C=0,w,P,O,j,D,T,R,Y,_,B,X,N;for(let e of(t.getWidthAt=function(t){let e=h-c/2;return t>x||c===g?u:u+(p-u)*(1-(t-e)/(c-g))},t.getX=function(e,i,d){return l+(i?-1:1)*(t.getWidthAt(a?2*h-e:e)/2+(d.dataLabel?.dataLabelPosition?.distance??S(this.options.dataLabels?.distance||0,p)))},t.center=[l,h,c],t.centerX=l,f))e.y&&e.isValid()&&(!d||!1!==e.visible)&&(W+=e.y);for(let e of f){if(N=null,O=W?e.y/W:0,B=(R=h-c/2+C*c)+O*c,Y=(T=l-(w=t.getWidthAt(R))/2)+w,X=(_=l-(w=t.getWidthAt(B))/2)+w,A(R)>=x?(T=_=l-u/2,Y=X=l+u/2):B>x&&(N=B,X=(_=l-(w=t.getWidthAt(x))/2)+w,B=x),a&&(R=2*h-R,B=2*h-B,null!==N&&(N=2*h-N)),b&&("point"===L||0===e.index||e.index===f.length-1||null!==N)){let t=Math.abs(B-R),i=Y-X,a=X-_,d=Math.sqrt(i*i+t*t);j=Math.atan(0!==i?t/i:1/0),D=d/2,null!==N&&(D=Math.min(D,Math.abs(N-B)/2)),a>=1&&(D=Math.min(D,a/2));let s=M(j);if(P="stack"===L&&0!==e.index?[["M",T,R],["L",Y,R]]:[["M",T+s.dx[0],R+s.dy[0]],["C",T+s.dx[1],R+s.dy[1],T+s.dx[2],R,T+s.dx[3],R],["L",Y-s.dx[3],R],["C",Y-s.dx[2],R,Y-s.dx[1],R+s.dy[1],Y-s.dx[0],R+s.dy[0]]],null!==N){let t=M(Math.PI/2);s=M(Math.PI/2+j),P.push(["L",X+s.dx[0],B-s.dy[0]],["C",X+s.dx[1],B-s.dy[1],X,B+s.dy[2],X,B+s.dy[3]]),"stack"===L&&e.index!==f.length-1?P.push(["L",X,N],["L",_,N]):P.push(["L",X,N-t.dy[3]],["C",X,N-t.dy[2],X-t.dx[2],N,X-t.dx[3],N],["L",_+t.dx[3],N],["C",_+t.dx[2],N,_,N-t.dy[2],_,N-t.dy[3]]),P.push(["L",_,B+s.dy[3]],["C",_,B+s.dy[2],_-s.dx[1],B-s.dy[1],_-s.dx[0],B-s.dy[0]])}else a>=1?(s=M(Math.PI-j),"stack"===L&&0===e.index?P.push(["L",X,B],["L",_,B]):P.push(["L",X+s.dx[0],B-s.dy[0]],["C",X+s.dx[1],B-s.dy[1],X-s.dx[2],B,X-s.dx[3],B],["L",_+s.dx[3],B],["C",_+s.dx[2],B,_-s.dx[1],B-s.dy[1],_-s.dx[0],B-s.dy[0]])):(s=M(Math.PI-2*j),P.push(["L",_+s.dx[0],B-s.dy[0]],["C",_+s.dx[1],B-s.dy[1],_-s.dx[1],B-s.dy[1],_-s.dx[0],B-s.dy[0]]))}else P=[["M",T,R],["L",Y,R],["L",X,B]],null!==N&&P.push(["L",X,N],["L",_,N]),P.push(["L",_,B]);P.push(["Z"]),e.shapeType="path",e.shapeArgs={d:P},e.percentage=100*O,e.plotX=l,e.plotY=(R+(N||B))/2,e.tooltipPos=[l,e.plotY],e.dlBox={x:_,y:R,topWidth:Y-T,bottomWidth:X-_,height:Math.abs(k(N,B)-R),width:NaN},e.slice=m,e.half=v,e.isValid()&&(!d||!1!==e.visible)&&(C+=O)}H(t,"afterTranslate")}sortByAngle(t){t.sort((t,e)=>t.plotY-e.plotY)}}T.defaultOptions=P(M.defaultOptions,{animation:!1,borderRadius:0,center:["50%","50%"],width:"90%",neckWidth:"30%",height:"100%",neckHeight:"25%",reversed:!1,size:!0,dataLabels:{connectorWidth:1,verticalAlign:"middle"},states:{select:{color:"#cccccc",borderColor:"#000000"}}}),C(T.prototype,{animate:m}),function(t){function e(){for(let t of this.series){let e=t.options&&t.options.dataLabels;w(e)&&(e=e[0]),t.is("pie")&&t.placeDataLabels&&e&&!e.inside&&t.placeDataLabels()}}t.compose=function(t){O(L,"FunnelSeries")&&W(t,"afterHideAllOverlappingLabels",e)}}(T||(T={})),b().registerSeriesType("funnel",T);let R=T,{merge:Y}=n();class _ extends R{}_.defaultOptions=Y(R.defaultOptions,{neckHeight:"0%",neckWidth:"0%",reversed:!0}),b().registerSeriesType("pyramid",_);let B=n();R.compose(B.Chart);let X=n();return s.default})());
|
package/modules/funnel.src.js
CHANGED
package/modules/funnel3d.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
!/**
|
|
2
|
-
* Highcharts JS v12.0
|
|
2
|
+
* Highcharts JS v12.1.0 (2024-12-17)
|
|
3
3
|
* @module highcharts/modules/funnel3d
|
|
4
4
|
* @requires highcharts
|
|
5
5
|
* @requires highcharts/highcharts-3d
|
|
@@ -10,4 +10,4 @@
|
|
|
10
10
|
* (c) 2010-2024 Kacper Madej
|
|
11
11
|
*
|
|
12
12
|
* License: www.highcharts.com/license
|
|
13
|
-
*/function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(t._Highcharts,t._Highcharts.Color,t._Highcharts.RendererRegistry,t._Highcharts.SeriesRegistry):"function"==typeof define&&define.amd?define("highcharts/modules/funnel3d",["highcharts/highcharts"],function(t){return e(t,t.Color,t.RendererRegistry,t.SeriesRegistry)}):"object"==typeof exports?exports["highcharts/modules/funnel3d"]=e(t._Highcharts,t._Highcharts.Color,t._Highcharts.RendererRegistry,t._Highcharts.SeriesRegistry):t.Highcharts=e(t.Highcharts,t.Highcharts.Color,t.Highcharts.RendererRegistry,t.Highcharts.SeriesRegistry)}("undefined"==typeof window?this:window,(t,e,i,r)=>(()=>{"use strict";var o={620:t=>{t.exports=e},608:t=>{t.exports=i},512:t=>{t.exports=r},944:e=>{e.exports=t}},n={};function s(t){var e=n[t];if(void 0!==e)return e.exports;var i=n[t]={exports:{}};return o[t](i,i.exports,s),i.exports}s.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return s.d(e,{a:e}),e},s.d=(t,e)=>{for(var i in e)s.o(e,i)&&!s.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},s.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var h={};s.d(h,{default:()=>Y});var d=s(944),a=/*#__PURE__*/s.n(d),l=s(620),p=/*#__PURE__*/s.n(l),g=s(608),c=/*#__PURE__*/s.n(g);let{parse:f}=p(),{charts:y}=a(),{Element3D:u}=c().getRendererType().prototype,{merge:x}=a(),w=class extends u{constructor(){super(...arguments),this.mainParts=["top","bottom"],this.parts=["top","bottom","frontUpper","backUpper","frontLower","backLower","rightUpper","rightLower"],this.sideGroups=["upperGroup","lowerGroup"],this.sideParts={upperGroup:["frontUpper","backUpper","rightUpper"],lowerGroup:["frontLower","backLower","rightLower"]},this.pathType="funnel3d"}opacitySetter(t){let e=parseFloat(t),i=this.parts,r=y[this.renderer.chartIndex],o="group-opacity-"+e+"-"+r.index;if(this.parts=this.mainParts,this.singleSetterForParts("opacity",e),this.parts=i,!r.renderer.filterId){for(let t of(r.renderer.definition({tagName:"filter",attributes:{id:o},children:[{tagName:"feComponentTransfer",children:[{tagName:"feFuncA",attributes:{type:"table",tableValues:"0 "+e}}]}]}),this.sideGroups))this[t].attr({filter:"url(#"+o+")"});if(this.renderer.styledMode)for(let t of(r.renderer.definition({tagName:"style",textContent:".highcharts-"+o+" {filter:url(#"+o+")}"}),this.sideGroups))this[t].addClass("highcharts-"+o)}return this}fillSetter(t){let e=f(t),i=e.rgba[3],r={top:f(t).brighten(.1).get(),bottom:f(t).brighten(-.2).get()};if(i<1?(e.rgba[3]=1,e=e.get("rgb"),this.attr({opacity:i})):e=t,e.linearGradient||e.radialGradient||!this.gradientForSides||(e={linearGradient:{x1:0,x2:1,y1:1,y2:1},stops:[[0,f(t).brighten(-.2).get()],[.5,t],[1,f(t).brighten(-.2).get()]]}),e.linearGradient)for(let t of this.sideGroups){let i=this[t].gradientBox,o=e.linearGradient,n=x(e,{linearGradient:{x1:i.x+o.x1*i.width,y1:i.y+o.y1*i.height,x2:i.x+o.x2*i.width,y2:i.y+o.y2*i.height}});for(let e of this.sideParts[t])r[e]=n}else if(x(!0,r,{frontUpper:e,backUpper:e,rightUpper:e,frontLower:e,backLower:e,rightLower:e}),e.radialGradient)for(let t of this.sideGroups){let e=this[t].gradientBox,i=e.x+e.width/2,r=e.y+e.height/2,o=Math.min(e.width,e.height);for(let e of this.sideParts[t])this[e].setRadialReference([i,r,o])}if(this.singleSetterForParts("fill",null,r),this.color=this.fill=t,e.linearGradient)for(let t of[this.frontLower,this.frontUpper]){let e=t.element,i=e&&this.renderer.gradients[e.gradient];i&&"userSpaceOnUse"!==i.attr("gradientUnits")&&i.attr({gradientUnits:"userSpaceOnUse"})}return this}adjustForGradient(){let t;for(let e of this.sideGroups){let i={x:Number.MAX_VALUE,y:Number.MAX_VALUE},r={x:-Number.MAX_VALUE,y:-Number.MAX_VALUE};for(let o of this.sideParts[e])t=this[o].getBBox(!0),i={x:Math.min(i.x,t.x),y:Math.min(i.y,t.y)},r={x:Math.max(r.x,t.x+t.width),y:Math.max(r.y,t.y+t.height)};this[e].gradientBox={x:i.x,width:r.x-i.x,y:i.y,height:r.y-i.y}}}zIndexSetter(){return this.finishedOnAdd&&this.adjustForGradient(),this.renderer.Element.prototype.zIndexSetter.apply(this,arguments)}onAdd(){this.adjustForGradient(),this.finishedOnAdd=!0}},{charts:m}=a(),{error:b,extend:A,merge:z}=a();function C(t){let e=this.element3d("funnel3d",t),i=this.styledMode,r={"stroke-width":1,stroke:"none"};for(let t of(e.upperGroup=this.g("funnel3d-upper-group").attr({zIndex:e.frontUpper.zIndex}).add(e),[e.frontUpper,e.backUpper,e.rightUpper]))i||t.attr(r),t.add(e.upperGroup);for(let t of(e.lowerGroup=this.g("funnel3d-lower-group").attr({zIndex:e.frontLower.zIndex}).add(e),[e.frontLower,e.backLower,e.rightLower]))i||t.attr(r),t.add(e.lowerGroup);return e.gradientForSides=t.gradientForSides,e}function L(t){this.getCylinderEnd||b("A required Highcharts module is missing: cylinder.js",!0,m[this.chartIndex]);let e=m[this.chartIndex],i=t.alphaCorrection=90-Math.abs(e.options.chart.options3d.alpha%180-90),r=this.cuboidPath.call(this,z(t,{depth:t.width,width:(t.width+t.bottom.width)/2})),o=r.isTop,n=!r.isFront,s=!!t.middle,h=this.getCylinderEnd(e,z(t,{x:t.x-t.width/2,z:t.z-t.width/2,alphaCorrection:i})),d=t.bottom.width,a=z(t,{width:d,x:t.x-d/2,z:t.z-d/2,alphaCorrection:i}),l=this.getCylinderEnd(e,a,!0),p=d,g=a,c=l,f=l,y;s&&(p=t.middle.width,g=z(t,{y:t.y+t.middle.fraction*t.height,width:p,x:t.x-p/2,z:t.z-p/2}),c=this.getCylinderEnd(e,g,!1),f=this.getCylinderEnd(e,g,!1));let u={top:h,bottom:l,frontUpper:this.getCylinderFront(h,c),zIndexes:{group:r.zIndexes.group,top:0!==o?0:3,bottom:1!==o?0:3,frontUpper:n?2:1,backUpper:n?1:2,rightUpper:n?2:1}};return u.backUpper=this.getCylinderBack(h,c),y=Math.min(p,t.width)/Math.max(p,t.width)!=1,u.rightUpper=this.getCylinderFront(this.getCylinderEnd(e,z(t,{x:t.x-t.width/2,z:t.z-t.width/2,alphaCorrection:y?-i:0}),!1),this.getCylinderEnd(e,z(g,{alphaCorrection:y?-i:0}),!s)),s&&(y=Math.min(p,d)/Math.max(p,d)!=1,z(!0,u,{frontLower:this.getCylinderFront(f,l),backLower:this.getCylinderBack(f,l),rightLower:this.getCylinderFront(this.getCylinderEnd(e,z(a,{alphaCorrection:y?-i:0}),!0),this.getCylinderEnd(e,z(g,{alphaCorrection:y?-i:0}),!1)),zIndexes:{frontLower:n?2:1,backLower:n?1:2,rightLower:n?1:2}})),u}var v=s(512),U=/*#__PURE__*/s.n(v);let{seriesTypes:{column:G}}=U(),{extend:M}=a();class k extends G.prototype.pointClass{}M(k.prototype,{shapeType:"funnel3d"});let{deg2rad:S}=a(),{pick:F}=a();function H(t,e,i,r){let o=e.options.chart.options3d,n=F(r,!!i&&e.inverted),s={x:e.plotWidth/2,y:e.plotHeight/2,z:o.depth/2,vd:F(o.depth,1)*F(o.viewDistance,0)},h=e.scale3d||1,d=S*o.beta*(n?-1:1),a=S*o.alpha*(n?-1:1),l={cosA:Math.cos(a),cosB:Math.cos(-d),sinA:Math.sin(a),sinB:Math.sin(-d)};return i||(s.x+=e.plotLeft,s.y+=e.plotTop),t.map(function(t){var e,i,r;let o=(e=(n?t.y:t.x)-s.x,i=(n?t.x:t.y)-s.y,r=(t.z||0)-s.z,{x:l.cosB*e-l.sinB*r,y:-l.sinA*l.sinB*e+l.cosA*i-l.cosB*l.sinA*r,z:l.cosA*l.sinB*e+l.sinA*i+l.cosA*l.cosB*r}),d=B(o,s,s.vd);return d.x=d.x*h+s.x,d.y=d.y*h+s.y,d.z=o.z*h+s.z,{x:n?d.y:d.x,y:n?d.x:d.y,z:d.z}})}function B(t,e,i){let r=i>0&&i<Number.POSITIVE_INFINITY?i/(t.z+e.z+i):1;return{x:t.x*r,y:t.y*r}}function I(t){let e=0,i,r;for(i=0;i<t.length;i++)r=(i+1)%t.length,e+=t[i].x*t[r].y-t[r].x*t[i].y;return e/2}let{noop:R}=a(),{perspective:E}={perspective:H,perspective3D:B,pointCameraDistance:function(t,e){let i=e.options.chart.options3d,r={x:e.plotWidth/2,y:e.plotHeight/2,z:F(i.depth,1)*F(i.viewDistance,0)+i.depth};return Math.sqrt(Math.pow(r.x-F(t.plotX,t.x),2)+Math.pow(r.y-F(t.plotY,t.y),2)+Math.pow(r.z-F(t.plotZ,t.z),2))},shapeArea:I,shapeArea3D:function(t,e,i){return I(H(t,e,i))}},{series:P,seriesTypes:{column:_}}=U(),{extend:T,merge:W,pick:N,relativeLength:O}=a();class j extends _{alignDataLabel(t,e,i){let r=t.dlBoxRaw,o=this.chart.inverted,n=t.plotY>N(this.translatedThreshold,this.yAxis.len),s=N(i.inside,!!this.options.stacking),h={x:r.x,y:r.y,height:0};i.align=N(i.align,!o||s?"center":n?"right":"left"),i.verticalAlign=N(i.verticalAlign,o||s?"middle":n?"top":"bottom"),"top"!==i.verticalAlign&&(h.y+=r.bottom/("bottom"===i.verticalAlign?1:2)),h.width=this.getWidthAt(h.y),this.options.reversed&&(h.width=r.fullWidth-h.width),s?h.x-=h.width/2:"left"===i.align?(i.align="right",h.x-=1.5*h.width):"right"===i.align?(i.align="left",h.x+=h.width/2):h.x-=h.width/2,t.dlBox=h,_.prototype.alignDataLabel.apply(this,arguments)}bindAxes(){P.prototype.bindAxes.apply(this,arguments),T(this.xAxis.options,{gridLineWidth:0,lineWidth:0,title:void 0,tickPositions:[]}),W(!0,this.yAxis.options,{gridLineWidth:0,title:void 0,labels:{enabled:!1}})}translate(){P.prototype.translate.apply(this,arguments);let t=this.chart,e=this.options,i=e.reversed,r=e.ignoreHiddenPoint,o=t.plotWidth,n=t.plotHeight,s=e.center,h=O(s[0],o),d=O(s[1],n),a=O(e.width,o),l=O(e.height,n),p=O(e.neckWidth,o),g=O(e.neckHeight,n),c=d-l/2+l-g,f=this.points,y=0,u=0,x,w,m,b,A,z,C,L,v;for(let t of(this.getWidthAt=w=function(t){return t>c||l===g?p:p+(a-p)*(1-(t-(d-l/2))/(l-g))},this.center=[h,d,l],this.centerX=h,f))r&&!1===t.visible||(y+=t.y);for(let o of f)C=null,m=y?o.y/y:0,z=(A=d-l/2+u*l)+m*l,x=w(A),L=z-A,v={gradientForSides:N(o.options.gradientForSides,e.gradientForSides),x:h,y:A,height:L,width:x,z:1,top:{width:x}},x=w(z),v.bottom={fraction:m,width:x},A>=c?v.isCylinder=!0:z>c&&(C=z,x=w(c),z=c,v.bottom.width=x,v.middle={fraction:L?(c-A)/L:0,width:x}),i&&(v.y=A=d+l/2-(u+m)*l,v.middle&&(v.middle.fraction=1-(L?v.middle.fraction:0)),x=v.width,v.width=v.bottom.width,v.bottom.width=x),o.shapeArgs=T(o.shapeArgs,v),o.percentage=100*m,o.plotX=h,i?o.plotY=d+l/2-(u+m/2)*l:o.plotY=(A+(C||z))/2,b=E([{x:h,y:o.plotY,z:i?-(a-w(o.plotY))/2:-w(o.plotY)/2}],t,!0)[0],o.tooltipPos=[b.x,b.y],o.dlBoxRaw={x:h,width:w(o.plotY),y:A,bottom:v.height||0,fullWidth:a},r&&!1===o.visible||(u+=m)}}j.compose=function(t){let e=t.prototype;e.funnel3d||(e.Element3D.types.funnel3d=w,A(e,{funnel3d:C,funnel3dPath:L}))},j.defaultOptions=W(_.defaultOptions,{center:["50%","50%"],width:"90%",neckWidth:"30%",height:"100%",neckHeight:"25%",reversed:!1,gradientForSides:!0,animation:!1,edgeWidth:0,colorByPoint:!0,showInLegend:!1,dataLabels:{align:"right",crop:!1,inside:!1,overflow:"allow"}}),T(j.prototype,{pointClass:k,translate3dShapes:R}),U().registerSeriesType("funnel3d",j),j.compose(c().getRendererType());let Y=a();return h.default})());
|
|
13
|
+
*/function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(t._Highcharts,t._Highcharts.Color,t._Highcharts.RendererRegistry,t._Highcharts.SeriesRegistry):"function"==typeof define&&define.amd?define("highcharts/modules/funnel3d",["highcharts/highcharts"],function(t){return e(t,t.Color,t.RendererRegistry,t.SeriesRegistry)}):"object"==typeof exports?exports["highcharts/modules/funnel3d"]=e(t._Highcharts,t._Highcharts.Color,t._Highcharts.RendererRegistry,t._Highcharts.SeriesRegistry):t.Highcharts=e(t.Highcharts,t.Highcharts.Color,t.Highcharts.RendererRegistry,t.Highcharts.SeriesRegistry)}("undefined"==typeof window?this:window,(t,e,i,r)=>(()=>{"use strict";var o={620:t=>{t.exports=e},608:t=>{t.exports=i},512:t=>{t.exports=r},944:e=>{e.exports=t}},n={};function s(t){var e=n[t];if(void 0!==e)return e.exports;var i=n[t]={exports:{}};return o[t](i,i.exports,s),i.exports}s.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return s.d(e,{a:e}),e},s.d=(t,e)=>{for(var i in e)s.o(e,i)&&!s.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},s.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var h={};s.d(h,{default:()=>Y});var d=s(944),a=s.n(d),l=s(620),p=s.n(l),g=s(608),c=s.n(g);let{parse:f}=p(),{charts:y}=a(),{Element3D:u}=c().getRendererType().prototype,{merge:x}=a(),w=class extends u{constructor(){super(...arguments),this.mainParts=["top","bottom"],this.parts=["top","bottom","frontUpper","backUpper","frontLower","backLower","rightUpper","rightLower"],this.sideGroups=["upperGroup","lowerGroup"],this.sideParts={upperGroup:["frontUpper","backUpper","rightUpper"],lowerGroup:["frontLower","backLower","rightLower"]},this.pathType="funnel3d"}opacitySetter(t){let e=parseFloat(t),i=this.parts,r=y[this.renderer.chartIndex],o="group-opacity-"+e+"-"+r.index;if(this.parts=this.mainParts,this.singleSetterForParts("opacity",e),this.parts=i,!r.renderer.filterId){for(let t of(r.renderer.definition({tagName:"filter",attributes:{id:o},children:[{tagName:"feComponentTransfer",children:[{tagName:"feFuncA",attributes:{type:"table",tableValues:"0 "+e}}]}]}),this.sideGroups))this[t].attr({filter:"url(#"+o+")"});if(this.renderer.styledMode)for(let t of(r.renderer.definition({tagName:"style",textContent:".highcharts-"+o+" {filter:url(#"+o+")}"}),this.sideGroups))this[t].addClass("highcharts-"+o)}return this}fillSetter(t){let e=f(t),i=e.rgba[3],r={top:f(t).brighten(.1).get(),bottom:f(t).brighten(-.2).get()};if(i<1?(e.rgba[3]=1,e=e.get("rgb"),this.attr({opacity:i})):e=t,e.linearGradient||e.radialGradient||!this.gradientForSides||(e={linearGradient:{x1:0,x2:1,y1:1,y2:1},stops:[[0,f(t).brighten(-.2).get()],[.5,t],[1,f(t).brighten(-.2).get()]]}),e.linearGradient)for(let t of this.sideGroups){let i=this[t].gradientBox,o=e.linearGradient,n=x(e,{linearGradient:{x1:i.x+o.x1*i.width,y1:i.y+o.y1*i.height,x2:i.x+o.x2*i.width,y2:i.y+o.y2*i.height}});for(let e of this.sideParts[t])r[e]=n}else if(x(!0,r,{frontUpper:e,backUpper:e,rightUpper:e,frontLower:e,backLower:e,rightLower:e}),e.radialGradient)for(let t of this.sideGroups){let e=this[t].gradientBox,i=e.x+e.width/2,r=e.y+e.height/2,o=Math.min(e.width,e.height);for(let e of this.sideParts[t])this[e].setRadialReference([i,r,o])}if(this.singleSetterForParts("fill",null,r),this.color=this.fill=t,e.linearGradient)for(let t of[this.frontLower,this.frontUpper]){let e=t.element,i=e&&this.renderer.gradients[e.gradient];i&&"userSpaceOnUse"!==i.attr("gradientUnits")&&i.attr({gradientUnits:"userSpaceOnUse"})}return this}adjustForGradient(){let t;for(let e of this.sideGroups){let i={x:Number.MAX_VALUE,y:Number.MAX_VALUE},r={x:-Number.MAX_VALUE,y:-Number.MAX_VALUE};for(let o of this.sideParts[e])t=this[o].getBBox(!0),i={x:Math.min(i.x,t.x),y:Math.min(i.y,t.y)},r={x:Math.max(r.x,t.x+t.width),y:Math.max(r.y,t.y+t.height)};this[e].gradientBox={x:i.x,width:r.x-i.x,y:i.y,height:r.y-i.y}}}zIndexSetter(){return this.finishedOnAdd&&this.adjustForGradient(),this.renderer.Element.prototype.zIndexSetter.apply(this,arguments)}onAdd(){this.adjustForGradient(),this.finishedOnAdd=!0}},{charts:m}=a(),{error:b,extend:A,merge:z}=a();function C(t){let e=this.element3d("funnel3d",t),i=this.styledMode,r={"stroke-width":1,stroke:"none"};for(let t of(e.upperGroup=this.g("funnel3d-upper-group").attr({zIndex:e.frontUpper.zIndex}).add(e),[e.frontUpper,e.backUpper,e.rightUpper]))i||t.attr(r),t.add(e.upperGroup);for(let t of(e.lowerGroup=this.g("funnel3d-lower-group").attr({zIndex:e.frontLower.zIndex}).add(e),[e.frontLower,e.backLower,e.rightLower]))i||t.attr(r),t.add(e.lowerGroup);return e.gradientForSides=t.gradientForSides,e}function L(t){this.getCylinderEnd||b("A required Highcharts module is missing: cylinder.js",!0,m[this.chartIndex]);let e=m[this.chartIndex],i=t.alphaCorrection=90-Math.abs(e.options.chart.options3d.alpha%180-90),r=this.cuboidPath.call(this,z(t,{depth:t.width,width:(t.width+t.bottom.width)/2})),o=r.isTop,n=!r.isFront,s=!!t.middle,h=this.getCylinderEnd(e,z(t,{x:t.x-t.width/2,z:t.z-t.width/2,alphaCorrection:i})),d=t.bottom.width,a=z(t,{width:d,x:t.x-d/2,z:t.z-d/2,alphaCorrection:i}),l=this.getCylinderEnd(e,a,!0),p=d,g=a,c=l,f=l,y;s&&(p=t.middle.width,g=z(t,{y:t.y+t.middle.fraction*t.height,width:p,x:t.x-p/2,z:t.z-p/2}),c=this.getCylinderEnd(e,g,!1),f=this.getCylinderEnd(e,g,!1));let u={top:h,bottom:l,frontUpper:this.getCylinderFront(h,c),zIndexes:{group:r.zIndexes.group,top:0!==o?0:3,bottom:1!==o?0:3,frontUpper:n?2:1,backUpper:n?1:2,rightUpper:n?2:1}};return u.backUpper=this.getCylinderBack(h,c),y=Math.min(p,t.width)/Math.max(p,t.width)!=1,u.rightUpper=this.getCylinderFront(this.getCylinderEnd(e,z(t,{x:t.x-t.width/2,z:t.z-t.width/2,alphaCorrection:y?-i:0}),!1),this.getCylinderEnd(e,z(g,{alphaCorrection:y?-i:0}),!s)),s&&(y=Math.min(p,d)/Math.max(p,d)!=1,z(!0,u,{frontLower:this.getCylinderFront(f,l),backLower:this.getCylinderBack(f,l),rightLower:this.getCylinderFront(this.getCylinderEnd(e,z(a,{alphaCorrection:y?-i:0}),!0),this.getCylinderEnd(e,z(g,{alphaCorrection:y?-i:0}),!1)),zIndexes:{frontLower:n?2:1,backLower:n?1:2,rightLower:n?1:2}})),u}var v=s(512),U=s.n(v);let{seriesTypes:{column:G}}=U(),{extend:M}=a();class k extends G.prototype.pointClass{}M(k.prototype,{shapeType:"funnel3d"});let{deg2rad:S}=a(),{pick:F}=a();function H(t,e,i,r){let o=e.options.chart.options3d,n=F(r,!!i&&e.inverted),s={x:e.plotWidth/2,y:e.plotHeight/2,z:o.depth/2,vd:F(o.depth,1)*F(o.viewDistance,0)},h=e.scale3d||1,d=S*o.beta*(n?-1:1),a=S*o.alpha*(n?-1:1),l={cosA:Math.cos(a),cosB:Math.cos(-d),sinA:Math.sin(a),sinB:Math.sin(-d)};return i||(s.x+=e.plotLeft,s.y+=e.plotTop),t.map(function(t){var e,i,r;let o=(e=(n?t.y:t.x)-s.x,i=(n?t.x:t.y)-s.y,r=(t.z||0)-s.z,{x:l.cosB*e-l.sinB*r,y:-l.sinA*l.sinB*e+l.cosA*i-l.cosB*l.sinA*r,z:l.cosA*l.sinB*e+l.sinA*i+l.cosA*l.cosB*r}),d=B(o,s,s.vd);return d.x=d.x*h+s.x,d.y=d.y*h+s.y,d.z=o.z*h+s.z,{x:n?d.y:d.x,y:n?d.x:d.y,z:d.z}})}function B(t,e,i){let r=i>0&&i<Number.POSITIVE_INFINITY?i/(t.z+e.z+i):1;return{x:t.x*r,y:t.y*r}}function I(t){let e=0,i,r;for(i=0;i<t.length;i++)r=(i+1)%t.length,e+=t[i].x*t[r].y-t[r].x*t[i].y;return e/2}let{noop:R}=a(),{perspective:E}={perspective:H,perspective3D:B,pointCameraDistance:function(t,e){let i=e.options.chart.options3d,r={x:e.plotWidth/2,y:e.plotHeight/2,z:F(i.depth,1)*F(i.viewDistance,0)+i.depth};return Math.sqrt(Math.pow(r.x-F(t.plotX,t.x),2)+Math.pow(r.y-F(t.plotY,t.y),2)+Math.pow(r.z-F(t.plotZ,t.z),2))},shapeArea:I,shapeArea3D:function(t,e,i){return I(H(t,e,i))}},{series:P,seriesTypes:{column:_}}=U(),{extend:T,merge:W,pick:N,relativeLength:O}=a();class j extends _{alignDataLabel(t,e,i){let r=t.dlBoxRaw,o=this.chart.inverted,n=t.plotY>N(this.translatedThreshold,this.yAxis.len),s=N(i.inside,!!this.options.stacking),h={x:r.x,y:r.y,height:0};i.align=N(i.align,!o||s?"center":n?"right":"left"),i.verticalAlign=N(i.verticalAlign,o||s?"middle":n?"top":"bottom"),"top"!==i.verticalAlign&&(h.y+=r.bottom/("bottom"===i.verticalAlign?1:2)),h.width=this.getWidthAt(h.y),this.options.reversed&&(h.width=r.fullWidth-h.width),s?h.x-=h.width/2:"left"===i.align?(i.align="right",h.x-=1.5*h.width):"right"===i.align?(i.align="left",h.x+=h.width/2):h.x-=h.width/2,t.dlBox=h,_.prototype.alignDataLabel.apply(this,arguments)}bindAxes(){P.prototype.bindAxes.apply(this,arguments),T(this.xAxis.options,{gridLineWidth:0,lineWidth:0,title:void 0,tickPositions:[]}),W(!0,this.yAxis.options,{gridLineWidth:0,title:void 0,labels:{enabled:!1}})}translate(){P.prototype.translate.apply(this,arguments);let t=this.chart,e=this.options,i=e.reversed,r=e.ignoreHiddenPoint,o=t.plotWidth,n=t.plotHeight,s=e.center,h=O(s[0],o),d=O(s[1],n),a=O(e.width,o),l=O(e.height,n),p=O(e.neckWidth,o),g=O(e.neckHeight,n),c=d-l/2+l-g,f=this.points,y=0,u=0,x,w,m,b,A,z,C,L,v;for(let t of(this.getWidthAt=w=function(t){return t>c||l===g?p:p+(a-p)*(1-(t-(d-l/2))/(l-g))},this.center=[h,d,l],this.centerX=h,f))r&&!1===t.visible||(y+=t.y);for(let o of f)C=null,m=y?o.y/y:0,z=(A=d-l/2+u*l)+m*l,x=w(A),L=z-A,v={gradientForSides:N(o.options.gradientForSides,e.gradientForSides),x:h,y:A,height:L,width:x,z:1,top:{width:x}},x=w(z),v.bottom={fraction:m,width:x},A>=c?v.isCylinder=!0:z>c&&(C=z,x=w(c),z=c,v.bottom.width=x,v.middle={fraction:L?(c-A)/L:0,width:x}),i&&(v.y=A=d+l/2-(u+m)*l,v.middle&&(v.middle.fraction=1-(L?v.middle.fraction:0)),x=v.width,v.width=v.bottom.width,v.bottom.width=x),o.shapeArgs=T(o.shapeArgs,v),o.percentage=100*m,o.plotX=h,i?o.plotY=d+l/2-(u+m/2)*l:o.plotY=(A+(C||z))/2,b=E([{x:h,y:o.plotY,z:i?-(a-w(o.plotY))/2:-w(o.plotY)/2}],t,!0)[0],o.tooltipPos=[b.x,b.y],o.dlBoxRaw={x:h,width:w(o.plotY),y:A,bottom:v.height||0,fullWidth:a},r&&!1===o.visible||(u+=m)}}j.compose=function(t){let e=t.prototype;e.funnel3d||(e.Element3D.types.funnel3d=w,A(e,{funnel3d:C,funnel3dPath:L}))},j.defaultOptions=W(_.defaultOptions,{center:["50%","50%"],width:"90%",neckWidth:"30%",height:"100%",neckHeight:"25%",reversed:!1,gradientForSides:!0,animation:!1,edgeWidth:0,colorByPoint:!0,showInLegend:!1,dataLabels:{align:"right",crop:!1,inside:!1,overflow:"allow"}}),T(j.prototype,{pointClass:k,translate3dShapes:R}),U().registerSeriesType("funnel3d",j),j.compose(c().getRendererType());let Y=a();return h.default})());
|
package/modules/funnel3d.src.js
CHANGED