@oliasoft-open-source/charts-library 5.10.0-beta-1 → 5.10.0-beta-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 +8 -7
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1193,24 +1193,24 @@ export { }
|
|
|
1193
1193
|
|
|
1194
1194
|
declare module 'chart.js' {
|
|
1195
1195
|
interface PluginOptionsByType<TType extends ChartType> {
|
|
1196
|
-
|
|
1197
|
-
enabled?: boolean;
|
|
1198
|
-
} | TLineMarkersOptions;
|
|
1196
|
+
annotationDraggerPlugin?: AnnotationDraggerPluginOptions;
|
|
1199
1197
|
}
|
|
1200
1198
|
}
|
|
1201
1199
|
|
|
1202
1200
|
|
|
1203
1201
|
declare module 'chart.js' {
|
|
1204
1202
|
interface PluginOptionsByType<TType extends ChartType> {
|
|
1205
|
-
|
|
1203
|
+
calloutConnectorPlugin?: {
|
|
1204
|
+
enableCalloutAnnotation?: boolean;
|
|
1205
|
+
};
|
|
1206
1206
|
}
|
|
1207
1207
|
}
|
|
1208
1208
|
|
|
1209
1209
|
|
|
1210
1210
|
declare module 'chart.js' {
|
|
1211
1211
|
interface PluginOptionsByType<TType extends ChartType> {
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
};
|
|
1212
|
+
lineMarkersPlugin?: {
|
|
1213
|
+
enabled?: boolean;
|
|
1214
|
+
} | TLineMarkersOptions;
|
|
1215
1215
|
}
|
|
1216
1216
|
}
|
package/dist/index.js
CHANGED
|
@@ -22483,29 +22483,30 @@ var drawTick = (args) => {
|
|
|
22483
22483
|
const labelOffset = tick?.labelOffsetPx ?? 6;
|
|
22484
22484
|
const bootSize = tick?.sizePx ?? 6;
|
|
22485
22485
|
const dir = side === LineMarkerSide.Left ? 1 : -1;
|
|
22486
|
-
const xTickEnd = x;
|
|
22486
|
+
const xTickEnd = crispLinePx(x);
|
|
22487
|
+
const yTickEnd = crispLinePx(y);
|
|
22487
22488
|
ctx?.save?.();
|
|
22488
22489
|
ctx.strokeStyle = color;
|
|
22489
22490
|
ctx.fillStyle = color;
|
|
22490
22491
|
ctx.lineWidth = 1;
|
|
22491
22492
|
const xOuter = direction === LineMarkerDirection.Vertical ? xTickEnd + dir * bootSize : xTickEnd;
|
|
22492
|
-
const yOuter = direction === LineMarkerDirection.Horizontal ?
|
|
22493
|
+
const yOuter = direction === LineMarkerDirection.Horizontal ? yTickEnd + (reverse ? bootSize : -bootSize) : yTickEnd;
|
|
22493
22494
|
const xThird = direction === LineMarkerDirection.Vertical ? xTickEnd : xTickEnd + dir * bootSize;
|
|
22494
|
-
const yThird = reverse ?
|
|
22495
|
+
const yThird = reverse ? yTickEnd + bootSize : yTickEnd - bootSize;
|
|
22495
22496
|
const bootBounds = {
|
|
22496
22497
|
left: Math.min(xTickEnd, xOuter, xThird),
|
|
22497
22498
|
right: Math.max(xTickEnd, xOuter, xThird),
|
|
22498
|
-
top: Math.min(
|
|
22499
|
-
bottom: Math.max(
|
|
22499
|
+
top: Math.min(yTickEnd, yOuter, yThird),
|
|
22500
|
+
bottom: Math.max(yTickEnd, yOuter, yThird)
|
|
22500
22501
|
};
|
|
22501
|
-
const canDrawBoot = (direction === LineMarkerDirection.Vertical ? isWithin(
|
|
22502
|
+
const canDrawBoot = (direction === LineMarkerDirection.Vertical ? isWithin(yTickEnd, chartArea.top, chartArea.bottom) : isWithin(xTickEnd, chartArea.left, chartArea.right)) && isTickElementInsideByDirection({
|
|
22502
22503
|
direction,
|
|
22503
22504
|
chartArea,
|
|
22504
22505
|
box: bootBounds
|
|
22505
22506
|
});
|
|
22506
22507
|
if (bootEnabled && canDrawBoot) {
|
|
22507
22508
|
ctx?.beginPath?.();
|
|
22508
|
-
ctx?.moveTo?.(xTickEnd,
|
|
22509
|
+
ctx?.moveTo?.(xTickEnd, yTickEnd);
|
|
22509
22510
|
ctx?.lineTo?.(xOuter, yOuter);
|
|
22510
22511
|
ctx?.lineTo?.(xThird, yThird);
|
|
22511
22512
|
ctx?.closePath?.();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oliasoft-open-source/charts-library",
|
|
3
|
-
"version": "5.10.0-beta-
|
|
3
|
+
"version": "5.10.0-beta-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": {
|