"use strict";(self.webpackChunkui=self.webpackChunkui||[]).push([[8022],{39898:function(e,n,t){t.d(n,{Z:function(){return d}});var a=t(1413),i=t(72791),r=t(81694),o=t.n(r),l=t(78946),u=t(39664),s=t(97901),c=t(80184),f=i.forwardRef((function(e,n){var t=e.data,r=e.index,f=e.id,d=void 0===f?"".concat(r):f,v=e.nameKey,R=void 0===v?"":v,g=e.aggregatedData,x=e.aggregationConfig,h=e.syncHoverState,m=e.axesScaleRange,p=e.ignoreOutliers,y=void 0!==p&&p,C=e.alignmentConfig,b=e.highlightMode,S=void 0===b?s.RT.Off:b,A=e.curveInterpolation,N=void 0===A?s.PD.Linear:A,w=e.chartTitle,k=e.zoom,T=e.onZoomChange,B=e.resizeMode,D=e.onMount,L=e.axesScaleType,z=void 0===L?{xAxis:s._f.Linear,yAxis:s._f.Linear}:L,H=e.readOnly,O=void 0!==H&&H,Z=e.margin,F=void 0===Z?{top:30,right:20,bottom:30,left:60}:Z,I=i.useRef({margin:F,height:0,width:0}),M=i.useRef({height:0,width:0}),j=i.useRef(null),K=i.useRef(null),_=i.useRef(null),E=i.useRef(null),V=i.useRef(null),q=i.useRef(null),P=i.useRef(null),U=i.useRef(null),W=i.useRef(null),X=i.useRef(null),Y=i.useRef(null),G=i.useRef({}),J=i.useRef({}),Q=i.useRef({}),$=i.useRef({}),ee=i.useRef(),ne=[],te=[t,k,y,S,z,m,N,x,O,C,B,d];function ae(){(0,s.CS)({visAreaRef:K}),function(){(0,s.N5)({index:r,id:d,nameKey:R,visBoxRef:I,plotBoxRef:M,parentRef:j,visAreaRef:K,svgNodeRef:_,bgRectNodeRef:E,plotNodeRef:V,axesNodeRef:q,linesNodeRef:P,attributesNodeRef:U,chartTitle:w});var e=(0,s.pV)({data:t,ignoreOutliers:y,visBoxRef:I,axesScaleType:z,axesScaleRange:m,aggregatedData:g,aggregationConfig:x,unableToDrawConditions:ne,attributesRef:Q}),n=e.processedData,a=e.processedAggrData,i=e.min,o=e.max;(0,s.me)({svgNodeRef:_,axesNodeRef:q,axesRef:G,plotBoxRef:M,xScale:Q.current.xScale,yScale:Q.current.yScale,visBoxRef:I,alignmentConfig:C,axesScaleType:z,humanizerConfigRef:$,drawBgTickLines:{y:!0,x:!1}}),(0,s.fW)({id:d,processedData:n,nameKey:R,linesNodeRef:P,linesRef:J,curveInterpolation:N,xScale:Q.current.xScale,yScale:Q.current.yScale,highlightMode:S,aggregationConfig:x,processedAggrData:a,readOnly:O}),!O&&P.current&&P.current.selectChildren().size()>100&&P.current.classed("optimizeRendering",!0),(0,s.Yz)({id:d,plotBoxRef:M,plotNodeRef:V,visBoxRef:I,axesRef:G,attributesRef:Q,linesRef:J,svgNodeRef:_,axesScaleType:z,min:i,max:o,axesScaleRange:m,zoom:k,onZoomChange:T,readOnly:O,unableToDrawConditions:ne}),O||(0,s.IF)({index:r,id:d,nameKey:R,data:t,processedData:n,axesScaleType:z,highlightMode:S,syncHoverState:h,visAreaRef:K,attributesRef:Q,plotBoxRef:M,visBoxRef:I,svgNodeRef:_,bgRectNodeRef:E,attributesNodeRef:U,xAxisLabelNodeRef:W,yAxisLabelNodeRef:X,linesNodeRef:P,highlightedNodeRef:Y,aggregationConfig:x,alignmentConfig:C}),(0,s.FO)({renderArr:ne,visAreaRef:K,attributesRef:Q,readOnly:O,syncHoverState:h})}()}var ie=i.useCallback((function(e){null!==e&&void 0!==e&&e.length&&(ee.current=window.requestAnimationFrame(ae))}),te),re=i.useCallback((function(){ee.current&&window.cancelAnimationFrame(ee.current)}),[]);return(0,l.yU)(ie,j,re),i.useEffect((function(){Q.current.currentXValue=void 0}),[C,t]),i.useEffect((function(){return ee.current=window.requestAnimationFrame(ae),function(){ee.current&&window.cancelAnimationFrame(ee.current)}}),te),i.useEffect((function(){"function"===typeof D&&D()}),[]),i.useImperativeHandle(n,(function(){return{setActiveLineAndCircle:function(e){var n,t,a=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];null===(n=(t=Q.current).setActiveLineAndCircle)||void 0===n||n.call(t,e,a,i)},updateHoverAttributes:function(e,n){var t,a;null===(t=(a=Q.current).updateHoverAttributes)||void 0===t||t.call(a,e,n)},clearHoverAttributes:function(){var e,n;null===(e=(n=Q.current).clearHoverAttributes)||void 0===e||e.call(n)},setFocusedState:function(e){var n;e&&(Q.current.focusedState=(0,a.Z)((0,a.Z)({},e),{},{visId:null!==(n=e.visId)&&void 0!==n?n:"".concat(e.chartIndex)}))}}})),(0,c.jsx)(u.Z,{children:(0,c.jsx)("div",{id:"vis-"+d,ref:j,className:o()("LineChart",{zoomMode:!O&&(null===k||void 0===k?void 0:k.active)}),children:(0,c.jsx)("div",{ref:K})})})}));f.displayName="LineChart";var d=i.memo(f)},10821:function(e,n,t){t.r(n);var a=t(72791),i=t(21280),r=t(39898),o=t(80184);n.default=function(e){var n,t=a.useCallback(i.Z(null===(n=e.callbacks)||void 0===n?void 0:n.on_active_point_change,100),[]),l=a.useRef(null),u=a.useRef(null),s=a.useRef(null),c=a.useCallback((function(e){var n,a=e.activePoint,i=e.focusedState;a?null!==i&&void 0!==i&&i.active?(null===(n=u.current)||void 0===n?void 0:n.key)!==(null===i||void 0===i?void 0:i.key)&&(u.current=i,s.current=null,t(a,!0)):(u.current=null,s.current!==a.key&&(s.current=a.key,t(a,!1))):(u.current=null,t(a,!1))}),[]);return(0,o.jsx)("div",{className:"VizComponentContainer",children:(0,o.jsx)(r.Z,{ref:l,id:"0",nameKey:"board",data:e.data,syncHoverState:c})})}}}]);
//# sourceMappingURL=LineChart.2c51a343.chunk.js.map