@oliasoft-open-source/charts-library 5.0.3 → 5.0.4
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/dist/assets/{Color-YHDXOIA2-CFxGLTGo.js → Color-YHDXOIA2-DdP7eK5i.js} +1 -1
- package/dist/assets/{DocsRenderer-CFRXHY34-DYq9QVnm.js → DocsRenderer-CFRXHY34-D5tFcMOW.js} +3 -3
- package/dist/assets/{entry-preview-GMzx4jbx.js → entry-preview-FiUJlA3m.js} +1 -1
- package/dist/assets/{iframe-B0eL311-.js → iframe-uMLayeIE.js} +2 -2
- package/dist/assets/line-chart-CO0E8gEH.js +1 -0
- package/dist/assets/{line-chart.stories-DQN9HSid.js → line-chart.stories-DeZuwimt.js} +1 -1
- package/dist/assets/{line-chart.test-case.stories-MVHnFE6p.js → line-chart.test-case.stories-1ubn_r6M.js} +1 -1
- package/dist/assets/{preview-BDcEpQCt.js → preview-C-6F1PUr.js} +2 -2
- package/dist/assets/{preview-DmyQH9tE.js → preview-CvzUewvo.js} +1 -1
- package/dist/iframe.html +1 -1
- package/dist/index.js.js +13 -7
- package/dist/index.js.js.map +1 -1
- package/dist/line-chart/controls/axes-options/axes-options-interfaces.d.ts +1 -0
- package/dist/line-chart/hooks/use-chart-functions.d.ts +1 -0
- package/dist/line-chart/state/action-types.d.ts +1 -0
- package/dist/line-chart/state/state.interfaces.d.ts +1 -0
- package/dist/project.json +1 -1
- package/package.json +1 -1
- package/dist/assets/line-chart-lsxhDZkS.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as t}from"./jsx-runtime-Y5Ju2SGo.js";import{r as l}from"./index-eCxJ45ll.js";import{D as J,B as e}from"./legend-CD8XU7nW.js";import{L as m}from"./line-chart-
|
|
1
|
+
import{j as t}from"./jsx-runtime-Y5Ju2SGo.js";import{r as l}from"./index-eCxJ45ll.js";import{D as J,B as e}from"./legend-CD8XU7nW.js";import{L as m}from"./line-chart-CO0E8gEH.js";import{D as Q}from"./legend-context-vqtlaWwg.js";import"./index-BGqSdrBK.js";import"./index-D3-0uUTW.js";import"./index-B-BONL6g.js";import"./get-draggableData-DS0HhINp.js";const p=[{label:"Dataset 1",data:[{x:0,y:0},{x:5,y:25}]}],Z={data:{datasets:p},options:{title:"Chart title",chartStyling:{height:"100%"}}},ct={title:"LineChart / Test Cases",component:m,args:{chart:Z}},d=()=>t.jsx(m,{chart:{data:{datasets:[{label:"Duration %",lineTension:"0",pointHitRadius:10,borderColor:"#dc3912",pointBackgroundColor:"#dc3912",borderWidth:2,pointRadius:4,data:[{x:3,y:0},{x:3,y:100}],yAxisID:"y2"}]},options:{direction:"vertical",axes:{x:[{label:"Duration (TempSim long) [d]",position:"bottom"}],y:[{label:"Probability"},{label:"Percentage [%]"}]},annotations:{annotationsData:[{annotationAxis:"y2",color:"darkgrey",value:16},{displayDragCoordinates:!1,color:"#ff9900",label:"P16",dragAxis:"y",enableDrag:!0,resizable:!1,type:"box",xMax:3,xMin:3,yMax:17,yMin:15,yScaleID:"y2"},{annotationAxis:"y2",color:"darkgrey",value:66},{displayDragCoordinates:!1,color:"#109618",label:"P66",dragAxis:"y",enableDrag:!0,resizable:!1,type:"box",xMax:3,xMin:3,yMax:67,yMin:65,yScaleID:"y2"},{annotationAxis:"y2",color:"darkgrey",value:78},{displayDragCoordinates:!1,color:"#990099",label:"P78",dragAxis:"y",enableDrag:!0,resizable:!1,type:"box",xMax:3,xMin:3,yMax:79,yMin:77,yScaleID:"y2"},{annotationAxis:"y2",color:"darkgrey",value:90},{displayDragCoordinates:!1,color:"#0099c6",label:"P90",dragAxis:"y",enableDrag:!0,resizable:!1,type:"box",xMax:3,xMin:3,yMax:91,yMin:89,yScaleID:"y2"}],enableDragAnnotation:!0,showAnnotations:!0},additionalAxesOptions:{range:{x:{min:3}},chartScaleType:"linear",reverse:!1},graph:{showMinorGridlines:!0},chartStyling:{height:"100%"},chartOptions:{showPoints:!1,enableDragAnnotation:!0}}}}),c=()=>{const[u,o]=l.useState(p),[B,y]=l.useState(0),[x,j]=l.useState(!1),[h,i]=l.useState(!0),[P,D]=l.useState(!1),[C,w]=l.useState(!0),[f,L]=l.useState("linear"),[A,b]=l.useState(!1),S=l.useMemo(()=>({title:"Stress Tester",axes:{x:[{label:"X Axis"}],y:[{label:"Y Axis"}]},chartOptions:{enableDragAnnotation:!0},annotations:{showAnnotations:!0,enableDragAnnotation:!0,annotationsData:[{enableDrag:!0,type:"box",xMin:3.5,xMax:4,yMin:5,yMax:10,color:"rgba(255, 0, 0, 0.3)",label:"DRAG ME!"},{type:"point",enableDrag:!0,xValue:1,yValue:10,radius:J,color:"red",label:"Draggable Point",labelConfig:{font:`bold 8px ${Q}`,color:"rgba(0,0,0,0.7)"}}]},chartStyling:{height:"100%",squareAspectRatio:C},additionalAxesOptions:{chartScaleType:f},legend:{display:!1}}),[u,C,f]),_=l.useMemo(()=>({data:{datasets:u},options:S}),[u,S]),O=()=>{b(!0),i(!0),setTimeout(()=>{i(!1),b(!1)},5e3)},U=()=>{o(p),y(a=>a+1),i(!0),b(!1)},E=()=>{D(!0);const a=[],s=50,r=40;for(let n=0;n<s;n++)setTimeout(()=>{a.push({label:`DS ${n+1}`,data:[{x:n,y:Math.random()*100},{x:n+1,y:Math.random()*100}],borderColor:`hsl(${n*(360/s)}, 100%, 50%)`}),o([...a]),n===15&&(console.warn("Forcing unmount mid-update"),i(!1)),n===25&&(console.warn("Remounting chart"),i(!0),y(g=>g+1)),n===s-1&&(console.log("Async injection complete"),D(!1))},n*r)},W=()=>{o([{label:"Broken Dataset",borderColor:"red"}])},F=()=>{o([])},V=()=>{o([{label:"X/Y Points",data:[{x:0,y:0},{x:1,y:1}],borderColor:"green"},{label:"Y Only Array",data:[2,4,6],borderColor:"blue"}])},$=()=>{o([{label:"Bad Y Axis Ref",yAxisID:"y-missing",data:[{x:1,y:1},{x:2,y:2}],borderColor:"purple"}])},z=()=>{const a=Array.from({length:5e3},(s,r)=>({x:r,y:Math.sin(r/100)*100}));o([{label:"Big 5k Points",data:a,borderColor:"orange"}])},X=()=>{o([{label:"Corrupt Point Dataset",data:[{x:0,y:10},{x:1},{y:20},null,void 0,"bad-value",{x:5,y:50}],borderColor:"red"}])},Y=()=>{o([{label:"Valid A",data:[{x:0,y:1},{x:1,y:2}],borderColor:"blue"},{label:"Corrupt",data:"not-an-array",borderColor:"red"},{label:"Valid B",data:[{x:0,y:3},{x:1,y:4}],borderColor:"green"}])},K=()=>{const a=[];for(let n=0;n<4;n++){const g=Array.from({length:3e3},(tt,H)=>({x:H,y:Math.random()*100}));a.push({label:`Stream DS ${n+1}`,data:g,borderColor:`hsl(${n*90}, 100%, 50%)`})}let s=0;const r=setInterval(()=>{o(a.slice(0,s+1)),s++,s===a.length&&clearInterval(r)},500)},N=()=>{L(a=>a==="linear"?"logarithmic":"linear")},G=()=>{w(a=>!a)},q=()=>{let a=0;const s=setInterval(()=>{y(r=>r+1),a++,a===100&&clearInterval(s)},30)};return t.jsxs(t.Fragment,{children:[t.jsxs("div",{style:{display:"flex",gap:8,flexWrap:"wrap",marginBottom:16},children:[t.jsx(e,{label:"Reset to Initial State",colored:!0,onClick:U}),t.jsx(e,{label:"Async Dataset + Unmount",onClick:E,disabled:P}),t.jsx(e,{label:"Set Invalid Dataset",onClick:W}),t.jsx(e,{label:"Set Empty Dataset",onClick:F}),t.jsx(e,{label:"Mixed Data Formats",onClick:V}),t.jsx(e,{label:"Bad Axis Ref",onClick:$}),t.jsx(e,{label:"Toggle size",onClick:()=>j(!x)}),t.jsx(e,{label:"Toggle Axis Type",onClick:N}),t.jsx(e,{label:"Toggle Aspect Ratio",onClick:G}),t.jsx(e,{label:"Spam Re-renders",onClick:q}),t.jsx(e,{label:h?"Unmount Chart":"Remount Chart",onClick:()=>i(a=>!a)}),t.jsx(e,{label:"Manual Re-render",onClick:()=>y(a=>a+1)}),t.jsx(e,{label:"Empty Dataset",onClick:()=>o([])}),t.jsx(e,{label:"Add 5k Points Slowly",onClick:z}),t.jsx(e,{label:"Dataset With Invalid Point",onClick:X}),t.jsx(e,{label:"Malformed Dataset Combo",onClick:Y}),t.jsx(e,{label:"Cycle Big Load (Async)",onClick:K}),t.jsx(e,{label:"Timed Unmount During Drag",onClick:O,disabled:A})]}),A&&t.jsx("span",{style:{color:"crimson",fontWeight:"bold"},children:"⏱ Unmounting in 5s – start dragging!"}),t.jsx("div",{style:{height:x?300:null,width:x?300:null,padding:"var(--padding)",overflow:"auto"},children:h?t.jsx(m,{chart:_},B):t.jsx("div",{style:{padding:40,textAlign:"center"},children:"Chart unmounted"})})]})};d.__docgenInfo={description:"",methods:[],displayName:"PartialRangeWithSimilarValues"};c.__docgenInfo={description:"",methods:[],displayName:"StressTest"};var M,v,R;d.parameters={...d.parameters,docs:{...(M=d.parameters)==null?void 0:M.docs,source:{originalSource:`() => {
|
|
2
2
|
return <LineChart chart={{
|
|
3
3
|
data: {
|
|
4
4
|
datasets: [{
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./DocsRenderer-CFRXHY34-
|
|
2
|
-
import{_ as o}from"./iframe-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./DocsRenderer-CFRXHY34-D5tFcMOW.js","./iframe-uMLayeIE.js","./index-eCxJ45ll.js","./jsx-runtime-Y5Ju2SGo.js","./index-BGqSdrBK.js","./index-D3-0uUTW.js","./index-Dytf1aFS.js","./client-9BU5HM4U.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as o}from"./iframe-uMLayeIE.js";var s=Object.defineProperty,i=(e,r)=>{for(var t in r)s(e,t,{get:r[t],enumerable:!0})},n={};i(n,{parameters:()=>d});var _=Object.entries(globalThis.TAGS_OPTIONS??{}).reduce((e,r)=>{let[t,a]=r;return a.excludeFromDocsStories&&(e[t]=!0),e},{}),d={docs:{renderer:async()=>{let{DocsRenderer:e}=await o(async()=>{const{DocsRenderer:r}=await import("./DocsRenderer-CFRXHY34-D5tFcMOW.js").then(t=>t.e);return{DocsRenderer:r}},__vite__mapDeps([0,1,2,3,4,5,6,7]),import.meta.url);return new e},stories:{filter:e=>{var r;return(e.tags||[]).filter(t=>_[t]).length===0&&!((r=e.parameters.docs)!=null&&r.disable)}}}};export{d as parameters};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{j as c}from"./jsx-runtime-Y5Ju2SGo.js";import{r as v}from"./index-eCxJ45ll.js";import{c as p,D as j}from"./DocsRenderer-CFRXHY34-
|
|
1
|
+
import{j as c}from"./jsx-runtime-Y5Ju2SGo.js";import{r as v}from"./index-eCxJ45ll.js";import{c as p,D as j}from"./DocsRenderer-CFRXHY34-D5tFcMOW.js";import{e as E}from"./index-B-BONL6g.js";import"./preview-C-6F1PUr.js";import"./iframe-uMLayeIE.js";import"./index-BGqSdrBK.js";import"./index-D3-0uUTW.js";import"./index-Dytf1aFS.js";import"./client-9BU5HM4U.js";var g="DARK_MODE";function f(t){"@babel/helpers - typeof";return f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},f(t)}var b;function A(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),e.push.apply(e,n)}return e}function D(t){for(var r=1;r<arguments.length;r++){var e=arguments[r]!=null?arguments[r]:{};r%2?A(Object(e),!0).forEach(function(n){I(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):A(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))})}return t}function I(t,r,e){return r=M(r),r in t?Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}function M(t){var r=R(t,"string");return f(r)==="symbol"?r:String(r)}function R(t,r){if(f(t)!=="object"||t===null)return t;var e=t[Symbol.toPrimitive];if(e!==void 0){var n=e.call(t,r);if(f(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}function y(t){return L(t)||N(t)||K(t)||x()}function x(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
2
2
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function K(t,r){if(t){if(typeof t=="string")return O(t,r);var e=Object.prototype.toString.call(t).slice(8,-1);if(e==="Object"&&t.constructor&&(e=t.constructor.name),e==="Map"||e==="Set")return Array.from(t);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return O(t,r)}}function N(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function L(t){if(Array.isArray(t))return O(t)}function O(t,r){(r==null||r>t.length)&&(r=t.length);for(var e=0,n=new Array(r);e<r;e++)n[e]=t[e];return n}const{global:U}=__STORYBOOK_MODULE_GLOBAL__,{STORY_CHANGED:st,SET_STORIES:ct,DOCS_RENDERED:ft}=__STORYBOOK_MODULE_CORE_EVENTS__;var T=U,Y=T.document,h=T.window,C="sb-addon-themes-3";(b=h.matchMedia)===null||b===void 0||b.call(h,"(prefers-color-scheme: dark)");var S={classTarget:"body",dark:p.dark,darkClass:["dark"],light:p.light,lightClass:["light"],stylePreview:!1,userHasExplicitlySetTheTheme:!1},k=function(r){h.localStorage.setItem(C,JSON.stringify(r))},B=function(r,e){var n=e.current,a=e.darkClass,l=a===void 0?S.darkClass:a,o=e.lightClass,i=o===void 0?S.lightClass:o;if(n==="dark"){var u,s;(u=r.classList).remove.apply(u,y(d(i))),(s=r.classList).add.apply(s,y(d(l)))}else{var m,_;(m=r.classList).remove.apply(m,y(d(l))),(_=r.classList).add.apply(_,y(d(i)))}},d=function(r){var e=[];return e.concat(r).map(function(n){return n})},W=function(r){var e=Y.querySelector(r.classTarget);e&&B(e,r)},P=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=h.localStorage.getItem(C);if(typeof e=="string"){var n=JSON.parse(e);return r&&(r.dark&&!E(n.dark,r.dark)&&(n.dark=r.dark,k(n)),r.light&&!E(n.light,r.light)&&(n.light=r.light,k(n))),n}return D(D({},S),r)};W(P());function H(t,r){return q(t)||G(t,r)||$(t,r)||V()}function V(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3
3
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $(t,r){if(t){if(typeof t=="string")return w(t,r);var e=Object.prototype.toString.call(t).slice(8,-1);if(e==="Object"&&t.constructor&&(e=t.constructor.name),e==="Map"||e==="Set")return Array.from(t);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return w(t,r)}}function w(t,r){(r==null||r>t.length)&&(r=t.length);for(var e=0,n=new Array(r);e<r;e++)n[e]=t[e];return n}function G(t,r){var e=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(e!=null){var n,a,l,o,i=[],u=!0,s=!1;try{if(l=(e=e.call(t)).next,r!==0)for(;!(u=(n=l.call(e)).done)&&(i.push(n.value),i.length!==r);u=!0);}catch(m){s=!0,a=m}finally{try{if(!u&&e.return!=null&&(o=e.return(),Object(o)!==o))return}finally{if(s)throw a}}return i}}function q(t){if(Array.isArray(t))return t}const{addons:J,useState:F,useEffect:z}=__STORYBOOK_MODULE_PREVIEW_API__;function Q(){var t=F(P().current==="dark"),r=H(t,2),e=r[0],n=r[1];return z(function(){var a=J.getChannel();return a.on(g,n),function(){return a.off(g,n)}},[]),e}const{definePreview:mt}=__STORYBOOK_MODULE_PREVIEW_API__,yt=[t=>c.jsx(c.Fragment,{children:c.jsx(t,{})}),t=>{const r=Q();return v.useEffect(()=>(document.documentElement.dataset.theme=r?"dark":"default",()=>{delete document.documentElement.dataset.theme}),[r]),c.jsx(t,{})}],X=t=>{const[r,e]=v.useState(!1);return v.useEffect(()=>{const n=a=>e(a);return t.context.channel.on(g,n),()=>{t.context.channel.off(g,n)}},[t.context.channel]),c.jsx(j,{...t,theme:r?p.dark:p.light})},dt={docs:{container:X},darkMode:{current:"light",stylePreview:!0}},pt=["autodocs"];export{yt as decorators,dt as parameters,pt as tags};
|
package/dist/iframe.html
CHANGED
package/dist/index.js.js
CHANGED
|
@@ -26321,6 +26321,7 @@ const chartAreaTextPlugin = {
|
|
|
26321
26321
|
} = options;
|
|
26322
26322
|
if (!showLabel || !text) return;
|
|
26323
26323
|
const { ctx, chartArea } = chart2;
|
|
26324
|
+
if (!ctx || !chartArea) return;
|
|
26324
26325
|
const maxWidth = calculateMaxWidth(initialMaxWidth, chartArea.width);
|
|
26325
26326
|
const [x2, y2] = getPositionCoordinates(position, chart2, xOffset, yOffset);
|
|
26326
26327
|
renderWrappedText(ctx, {
|
|
@@ -26338,8 +26339,8 @@ const getMousePositionInCoordinates = (event, canvas2, scales, xScaleID, yScaleI
|
|
|
26338
26339
|
const rect = canvas2.getBoundingClientRect();
|
|
26339
26340
|
const x2 = event.clientX - rect.left;
|
|
26340
26341
|
const y2 = event.clientY - rect.top;
|
|
26341
|
-
const xScale = scales[xScaleID];
|
|
26342
|
-
const yScale = scales[yScaleID];
|
|
26342
|
+
const xScale = scales == null ? void 0 : scales[xScaleID];
|
|
26343
|
+
const yScale = scales == null ? void 0 : scales[yScaleID];
|
|
26343
26344
|
const xValue = (xScale == null ? void 0 : xScale.getValueForPixel(x2)) ?? -1;
|
|
26344
26345
|
const yValue = (yScale == null ? void 0 : yScale.getValueForPixel(y2)) ?? -1;
|
|
26345
26346
|
return { x: xValue, y: yValue };
|
|
@@ -26374,8 +26375,10 @@ const calculateAnnotationMetricsInValuesInPixels = (annotation2, scales, xScaleI
|
|
|
26374
26375
|
let centerY;
|
|
26375
26376
|
let width;
|
|
26376
26377
|
let height;
|
|
26377
|
-
const xScale = scales[xScaleID];
|
|
26378
|
-
const yScale = scales[yScaleID];
|
|
26378
|
+
const xScale = scales == null ? void 0 : scales[xScaleID];
|
|
26379
|
+
const yScale = scales == null ? void 0 : scales[yScaleID];
|
|
26380
|
+
if (!xScale || !yScale)
|
|
26381
|
+
return { centerX: -1, centerY: -1, width: 0, height: 0 };
|
|
26379
26382
|
if (!isNil(xMin) && !isNil(xMax) && !isNil(yMin) && !isNil(yMax) && type === AnnotationType.BOX) {
|
|
26380
26383
|
const xCenterValue = (xMin + xMax) / 2;
|
|
26381
26384
|
const yCenterValue = (yMin + yMax) / 2;
|
|
@@ -26420,8 +26423,9 @@ const isWithinChartArea = ({
|
|
|
26420
26423
|
const withinRangeY = y2 !== void 0 && dragRange.y ? y2 >= dragRange.y[0] && y2 <= dragRange.y[1] : true;
|
|
26421
26424
|
return withinRangeX && withinRangeY;
|
|
26422
26425
|
}
|
|
26423
|
-
const xScale = scales[xScaleID];
|
|
26424
|
-
const yScale = scales[yScaleID];
|
|
26426
|
+
const xScale = scales == null ? void 0 : scales[xScaleID];
|
|
26427
|
+
const yScale = scales == null ? void 0 : scales[yScaleID];
|
|
26428
|
+
if (!(scales == null ? void 0 : scales[xScaleID]) || !(scales == null ? void 0 : scales[yScaleID])) return false;
|
|
26425
26429
|
const minX = (xScale == null ? void 0 : xScale.getValueForPixel(chartArea.left)) ?? Number.NEGATIVE_INFINITY;
|
|
26426
26430
|
const maxX = (xScale == null ? void 0 : xScale.getValueForPixel(chartArea.right)) ?? Number.POSITIVE_INFINITY;
|
|
26427
26431
|
const minY = (yScale == null ? void 0 : yScale.getValueForPixel(chartArea.bottom)) ?? Number.NEGATIVE_INFINITY;
|
|
@@ -26443,6 +26447,7 @@ const isWithinChartArea = ({
|
|
|
26443
26447
|
return true;
|
|
26444
26448
|
};
|
|
26445
26449
|
const updateAnnotationPositionWithinBounds = (axis, newPosition, activeAnnotation, chart2, scales, xScaleID, yScaleID, metrics) => {
|
|
26450
|
+
if (!(chart2 == null ? void 0 : chart2.chartArea)) return;
|
|
26446
26451
|
const { resizable, dragRange = null } = activeAnnotation ?? {};
|
|
26447
26452
|
const checkArea = isWithinChartArea({
|
|
26448
26453
|
[axis]: newPosition,
|
|
@@ -40804,7 +40809,8 @@ const gradientBackgroundPlugin = {
|
|
|
40804
40809
|
id: "gradientBackgroundPlugin",
|
|
40805
40810
|
beforeDraw: (chart2) => {
|
|
40806
40811
|
const { ctx, chartArea, options } = chart2;
|
|
40807
|
-
|
|
40812
|
+
if (!ctx || !chartArea) return;
|
|
40813
|
+
const gradientOptions = options == null ? void 0 : options.gradient;
|
|
40808
40814
|
const {
|
|
40809
40815
|
display = false,
|
|
40810
40816
|
gradientColors,
|