@oliasoft-open-source/charts-library 8.0.1 → 8.0.3
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/index.d.ts +7 -7
- package/dist/index.js +14 -2
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -2220,25 +2220,25 @@ export { }
|
|
|
2220
2220
|
|
|
2221
2221
|
declare module 'chart.js' {
|
|
2222
2222
|
interface PluginOptionsByType<TType extends ChartType> {
|
|
2223
|
-
|
|
2223
|
+
lineMarkersPlugin?: {
|
|
2224
|
+
enabled?: boolean;
|
|
2225
|
+
} | TLineMarkersOptions;
|
|
2224
2226
|
}
|
|
2225
2227
|
}
|
|
2226
2228
|
|
|
2227
2229
|
|
|
2228
2230
|
declare module 'chart.js' {
|
|
2229
2231
|
interface PluginOptionsByType<TType extends ChartType> {
|
|
2230
|
-
|
|
2231
|
-
enableCalloutAnnotation?: boolean;
|
|
2232
|
-
};
|
|
2232
|
+
annotationDraggerPlugin?: AnnotationDraggerPluginOptions;
|
|
2233
2233
|
}
|
|
2234
2234
|
}
|
|
2235
2235
|
|
|
2236
2236
|
|
|
2237
2237
|
declare module 'chart.js' {
|
|
2238
2238
|
interface PluginOptionsByType<TType extends ChartType> {
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
}
|
|
2239
|
+
calloutConnectorPlugin?: {
|
|
2240
|
+
enableCalloutAnnotation?: boolean;
|
|
2241
|
+
};
|
|
2242
2242
|
}
|
|
2243
2243
|
}
|
|
2244
2244
|
|
package/dist/index.js
CHANGED
|
@@ -33636,9 +33636,10 @@ var LineOptions = ({ options }) => {
|
|
|
33636
33636
|
small: true,
|
|
33637
33637
|
round: true,
|
|
33638
33638
|
icon: selectedOption?.icon,
|
|
33639
|
-
"aria-label": selectedOption?.label
|
|
33639
|
+
"aria-label": selectedOption?.label,
|
|
33640
|
+
active: menuOpen
|
|
33640
33641
|
})
|
|
33641
|
-
})
|
|
33642
|
+
}, menuOpen ? "open" : "closed")
|
|
33642
33643
|
}
|
|
33643
33644
|
});
|
|
33644
33645
|
};
|
|
@@ -33701,6 +33702,7 @@ var DragOptions = ({ options }) => {
|
|
|
33701
33702
|
return /* @__PURE__ */ jsx(Menu, { menu: {
|
|
33702
33703
|
sections: options,
|
|
33703
33704
|
trigger: "Component",
|
|
33705
|
+
placement: "bottom-end",
|
|
33704
33706
|
component: /* @__PURE__ */ jsx(Button, {
|
|
33705
33707
|
colored: "muted",
|
|
33706
33708
|
basic: true,
|
|
@@ -34164,9 +34166,13 @@ var AxesOptionsPopover = (optionsPopover) => {
|
|
|
34164
34166
|
});
|
|
34165
34167
|
};
|
|
34166
34168
|
var AxesOptions = (optionsPopover) => {
|
|
34169
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
34167
34170
|
return /* @__PURE__ */ jsx(Popover, {
|
|
34168
34171
|
placement: "bottom-start",
|
|
34169
34172
|
content: /* @__PURE__ */ jsx(AxesOptionsPopover, { ...optionsPopover }),
|
|
34173
|
+
showArrow: false,
|
|
34174
|
+
isOpen,
|
|
34175
|
+
onToggle: setIsOpen,
|
|
34170
34176
|
children: /* @__PURE__ */ jsx(Tooltip, {
|
|
34171
34177
|
text: optionsPopover.translations.axesOptions,
|
|
34172
34178
|
placement: "bottom-start",
|
|
@@ -34176,6 +34182,7 @@ var AxesOptions = (optionsPopover) => {
|
|
|
34176
34182
|
basic: true,
|
|
34177
34183
|
colored: "muted",
|
|
34178
34184
|
round: true,
|
|
34185
|
+
active: isOpen,
|
|
34179
34186
|
icon: /* @__PURE__ */ jsx(TbRuler, {}),
|
|
34180
34187
|
"aria-label": optionsPopover.translations.axesOptions
|
|
34181
34188
|
})
|
|
@@ -38438,6 +38445,7 @@ var Legend = ({ chartRef, legendConfig }) => {
|
|
|
38438
38445
|
const resizeRef = measureRef;
|
|
38439
38446
|
const panelRef = useRef(null);
|
|
38440
38447
|
const [legendPosition, setLegendPosition] = useState(legend?.position || Position.BottomLeft);
|
|
38448
|
+
const [prevLegendPositionProp, setPrevLegendPositionProp] = useState(legend?.position);
|
|
38441
38449
|
const panelRect = panelRef?.current ? panelRef.current.getBoundingClientRect() : null;
|
|
38442
38450
|
const panelSize = {
|
|
38443
38451
|
width: panelRect?.width,
|
|
@@ -38453,6 +38461,10 @@ var Legend = ({ chartRef, legendConfig }) => {
|
|
|
38453
38461
|
}, 20);
|
|
38454
38462
|
return () => clearTimeout(timeout);
|
|
38455
38463
|
}, [chart?.chartArea, measureRect]);
|
|
38464
|
+
if (legend?.position && legend.position !== prevLegendPositionProp) {
|
|
38465
|
+
setPrevLegendPositionProp(legend.position);
|
|
38466
|
+
setLegendPosition(legend.position);
|
|
38467
|
+
}
|
|
38456
38468
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
38457
38469
|
/* @__PURE__ */ jsx("div", {
|
|
38458
38470
|
ref: resizeRef,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oliasoft-open-source/charts-library",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.3",
|
|
4
4
|
"description": "React Chart Library (based on Chart.js and react-chart-js-2)",
|
|
5
5
|
"homepage": "https://gitlab.com/oliasoft-open-source/charts-library",
|
|
6
6
|
"bugs": {
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@dnd-kit/sortable": "^10.0.0",
|
|
44
44
|
"@microsoft/api-extractor": "^7.59.0",
|
|
45
|
-
"@oliasoft-open-source/react-ui-library": "^
|
|
45
|
+
"@oliasoft-open-source/react-ui-library": "^9.6.0",
|
|
46
46
|
"@oliasoft-open-source/units": "^5.6.0",
|
|
47
47
|
"@storybook/addon-docs": "^10.5.10",
|
|
48
48
|
"@storybook/addon-themes": "^10.5.10",
|