highcharts
Version:
JavaScript charting framework
13 lines • 6.15 kB
JavaScript
!/**
* Highcharts JS v13.0.1 (2026-08-17)
* @module highcharts/modules/parallel-coordinates
* @requires highcharts
*
* Support for parallel coordinates in Highcharts
*
* (c) 2010-2026 Highsoft AS
* Author: Paweł Fus
*
* A commercial license may be required depending on use,
* see www.highcharts.com/license
*/function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(e._Highcharts,e._Highcharts.Templating):"function"==typeof define&&define.amd?define("highcharts/modules/parallel-coordinates",["highcharts/highcharts"],function(e){return t(e,e.Templating)}):"object"==typeof exports?exports["highcharts/modules/parallel-coordinates"]=t(e._Highcharts,e._Highcharts.Templating):e.Highcharts=t(e.Highcharts,e.Highcharts.Templating)}("u"<typeof window?this:window,(e,t)=>(()=>{"use strict";var i,a,s,o={984(e){e.exports=t},944(t){t.exports=e}};let l={};function r(e){let t=l[e];if(void 0!==t)return t.exports;let i=l[e]={exports:{}};return o[e](i,i.exports,r),i.exports}r.n=e=>{let t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{if(Array.isArray(t))for(var i=0;i<t.length;){var a=t[i++],s=t[i++];r.o(e,a)?0===s&&i++:0===s?Object.defineProperty(e,a,{enumerable:!0,value:t[i++]}):Object.defineProperty(e,a,{enumerable:!0,get:s})}else for(var a in t)r.o(t,a)&&!r.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);let n={};r.d(n,{default:()=>I});var h=r(944),p=r.n(h);let d={parallelCoordinates:!1,parallelAxes:{lineWidth:1,title:{text:"",reserveSpace:!1},labels:{x:0,y:4,align:"center",reserveSpace:!1},offset:0}},c={lineWidth:0,tickLength:0,opposite:!0,type:"category"};class f{constructor(e){this.axis=e}setPosition(e,t){let i=this.axis,a=i.chart,s=((this.position||0)+.5)/(a.parallelInfo.counter+1);a.polar?t.angle=360*s:(t[e[0]]=100*s+"%",i[e[1]]=t[e[1]]=0,i[e[2]]=t[e[2]]=null,i[e[3]]=t[e[3]]=null)}}!function(e){function t(e){let t=this.chart,i=this.parallelCoordinates,a=["left","width","height","top"];if(t.hasParallelCoordinates)if(t.inverted&&(a=a.reverse()),this.isXAxis)this.options=(0,h.merge)(this.options,c,e.userOptions);else{let s=t.yAxis.indexOf(this);this.options=(0,h.merge)(this.options,this.chart.options.chart.parallelAxes,e.userOptions),i.position=(0,h.pick)(i.position,s>=0?s:t.yAxis.length),i.setPosition(a,this.options)}}function i(e){let t=this.chart,i=this.parallelCoordinates;if(i&&t&&t.hasParallelCoordinates&&!this.isXAxis){let t=i.position,a=[];this.series.forEach(function(e){e.visible&&(0,h.isNumber)(t)&&(a=(e.pointArrayMap||["y"]).reduce((i,a)=>[...i,e.getColumn(a)?.[t]??null],a))}),a=a.filter(h.isNumber),this.dataMin=(0,h.arrayMin)(a),this.dataMax=(0,h.arrayMax)(a),e.preventDefault()}}function a(){this.parallelCoordinates||(this.parallelCoordinates=new f(this))}e.compose=function(e){e.keepProps.includes("parallel")||(e.keepProps.push("parallel"),(0,h.addEvent)(e,"init",a),(0,h.addEvent)(e,"afterSetOptions",t),(0,h.addEvent)(e,"getSeriesExtremes",i))}}(i||(i={}));let u=i;var x=r(984),g=r.n(x);let{composed:m}=p(),{format:y}=g();!function(e){function t(){let e=this.chart,t=this.points,i=t&&t.length,a=Number.MAX_VALUE,s,o;if(this.chart.hasParallelCoordinates){for(let l=0;l<i;l++)o=t[l],(0,h.defined)(o.y)?(e.polar?o.plotX=e.yAxis[l].angleRad||0:e.inverted?o.plotX=e.plotHeight-e.yAxis[l].top+e.plotTop:o.plotX=e.yAxis[l].left-e.plotLeft,o.clientX=o.plotX,o.plotY=e.yAxis[l].translate(o.y,!1,!0,void 0,!0),(0,h.isNumber)(o.high)&&(o.plotHigh=e.yAxis[l].translate(o.high,!1,!0,void 0,!0)),void 0!==s&&(a=Math.min(a,Math.abs(o.plotX-s))),s=o.plotX,o.isInside=e.isInsidePlot(o.plotX,o.plotY,{inverted:e.inverted})):o.isNull=!0;this.closestPointRangePx=a}}function i(e){let t=this.chart;if(t.hasParallelCoordinates){for(let e of t.axes)(0,h.insertItem)(this,e.series),e.isDirty=!0;this.xAxis=t.xAxis[0],this.yAxis=t.yAxis[0],e.preventDefault()}}function a(){let e=this.chart;if(e.hasParallelCoordinates)for(let t of e.axes||[])t&&t.series&&((0,h.erase)(t.series,this),t.isDirty=t.forceRedraw=!0)}function s(){let e=this.chart;if(e?.hasParallelCoordinates)for(let t of this.points){let i,a=e.yAxis[t.x||0],s=a.options,o=s.tooltipValueFormat??s.labels.format;i=o?y(o,(0,h.extend)(t,{value:t.y}),e):a.dateTime?e.time.dateFormat(e.time.resolveDTLFormat(s.dateTimeLabelFormats?.[a.tickPositions.info?.unitName||"year"]||"").main,t.y??void 0):(0,h.isArray)(s.categories)?s.categories[t.y??-1]:String(t.y??""),t.formattedValue=i}}e.compose=function(e){(0,h.pushUnique)(m,"ParallelSeries")&&((0,h.addEvent)(e,"afterTranslate",t,{order:1}),(0,h.addEvent)(e,"bindAxes",i),(0,h.addEvent)(e,"destroy",a),(0,h.addEvent)(e,"afterGeneratePoints",s))}}(a||(a={}));let A=a;class v{constructor(e){this.chart=e}setParallelInfo(e){let t=this.chart||this,i=e.series;for(let e of(t.parallelInfo={counter:0},i))e.data&&(t.parallelInfo.counter=Math.max(t.parallelInfo.counter,e.data.length-1))}}function P(e){let t=e.args[0],i=(0,h.splat)(t.yAxis||{}),a=[],s=i.length;if(this.hasParallelCoordinates=t.chart&&t.chart.parallelCoordinates,this.hasParallelCoordinates){for(this.setParallelInfo(t);s<=this.parallelInfo.counter;s++)a.push({});t.legend||(t.legend={}),t.legend&&void 0===t.legend.enabled&&(t.legend.enabled=!1),(0,h.merge)(!0,t,{boost:{seriesThreshold:Number.MAX_VALUE},plotOptions:{series:{boostThreshold:Number.MAX_VALUE}}}),t.yAxis=i.concat(a),t.xAxis=(0,h.merge)(c,(0,h.splat)(t.xAxis||{})[0])}}function b(e){let t=e.options;if(!1!==e.hasChanged&&(t.chart&&((0,h.defined)(t.chart.parallelCoordinates)&&(this.hasParallelCoordinates=t.chart.parallelCoordinates),this.options.chart.parallelAxes=(0,h.merge)(this.options.chart.parallelAxes,t.chart.parallelAxes)),this.hasParallelCoordinates))for(let e of(t.series&&this.setParallelInfo(t),this.yAxis))e.update({},!1)}(s||(s={})).compose=function(e,t,i,a){u.compose(e),A.compose(a);let s=v.prototype,o=t.prototype;o.setParallelInfo||(o.setParallelInfo=s.setParallelInfo,(0,h.addEvent)(t,"init",P),(0,h.addEvent)(t,"update",b),(0,h.merge)(!0,i.chart,d))};let C=s,E=p();C.compose(E.Axis,E.Chart,E.defaultOptions,E.Series);let I=p();return n.default})());