@oliasoft-open-source/charts-library 4.7.3 → 4.7.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.
@@ -76,6 +76,8 @@ export interface ICommonAnnotationsData {
76
76
  y?: [number, number];
77
77
  };
78
78
  displayDragCoordinates?: boolean;
79
+ xScaleID?: string;
80
+ yScaleID?: string;
79
81
  }
80
82
  export interface ICommonGradientColor {
81
83
  offset: number;
@@ -84,5 +84,7 @@ declare const getAnnotation: ({ showAnnotations, annotationsData, }: IGetAnnotat
84
84
  x?: [number, number] | undefined;
85
85
  y?: [number, number] | undefined;
86
86
  } | undefined;
87
+ xScaleID?: string | undefined;
88
+ yScaleID?: string | undefined;
87
89
  }[];
88
90
  export default getAnnotation;
@@ -2,6 +2,7 @@ import { ChartType, Plugin, Scale } from 'chart.js';
2
2
  export interface IScales {
3
3
  x: Scale;
4
4
  y: Scale;
5
+ [key: string]: Scale;
5
6
  }
6
7
  export interface AnnotationDraggerPluginOptions {
7
8
  enabled: boolean;
@@ -6,7 +6,7 @@ export declare const getMousePosition: (event: MouseEvent, canvas: HTMLCanvasEle
6
6
  x: number;
7
7
  y: number;
8
8
  };
9
- export declare const getMousePositionInCoordinates: (event: MouseEvent, canvas: HTMLCanvasElement, scales: IScales) => {
9
+ export declare const getMousePositionInCoordinates: (event: MouseEvent, canvas: HTMLCanvasElement, scales: IScales, xScaleID: string, yScaleID: string) => {
10
10
  x: number;
11
11
  y: number;
12
12
  };
@@ -16,7 +16,7 @@ export declare const calculateAnnotationMetricsInValues: (annotation: ICommonAnn
16
16
  width: number | undefined;
17
17
  height: number | undefined;
18
18
  };
19
- export declare const calculateAnnotationMetricsInValuesInPixels: (annotation: ICommonAnnotationsData, scales: IScales) => {
19
+ export declare const calculateAnnotationMetricsInValuesInPixels: (annotation: ICommonAnnotationsData, scales: IScales, xScaleID: string, yScaleID: string) => {
20
20
  centerX: number | undefined;
21
21
  centerY: number | undefined;
22
22
  width: number | undefined;
@@ -42,9 +42,11 @@ export interface IIsWithinChartAreaProps {
42
42
  y?: [number, number];
43
43
  } | null;
44
44
  annotationType: AnnotationType;
45
+ xScaleID: string;
46
+ yScaleID: string;
45
47
  }
46
- export declare const isWithinChartArea: ({ x, y, chartArea, scales, metrics, resizable, dragRange, annotationType, }: IIsWithinChartAreaProps) => boolean;
47
- export declare const updateAnnotationPositionWithinBounds: (axis: DragAxis, newPosition: number, activeAnnotation: ICommonAnnotationsData, chart: Chart, scales: IScales, metrics?: {
48
+ export declare const isWithinChartArea: ({ x, y, chartArea, scales, metrics, resizable, dragRange, annotationType, xScaleID, yScaleID, }: IIsWithinChartAreaProps) => boolean;
49
+ export declare const updateAnnotationPositionWithinBounds: (axis: DragAxis, newPosition: number, activeAnnotation: ICommonAnnotationsData, chart: Chart, scales: IScales, xScaleID: string, yScaleID: string, metrics?: {
48
50
  width?: number;
49
51
  height?: number;
50
52
  }) => void;
@@ -1554,35 +1554,131 @@ export namespace DragAnnotations {
1554
1554
  }
1555
1555
  export { args_46 as args };
1556
1556
  }
1557
- export function ChartFillerPlugin(args: any): import("react/jsx-runtime").JSX.Element;
1558
- export namespace ChartFillerPlugin {
1557
+ export function MultiAxesDragAnnotations(args: any): import("react/jsx-runtime").JSX.Element;
1558
+ export namespace MultiAxesDragAnnotations {
1559
1559
  export namespace args_47 {
1560
1560
  export namespace chart_45 {
1561
+ export namespace data_25 {
1562
+ let datasets_25: ({
1563
+ label: string;
1564
+ data: {
1565
+ x: number;
1566
+ y: number;
1567
+ }[];
1568
+ yAxisID?: undefined;
1569
+ } | {
1570
+ label: string;
1571
+ data: {
1572
+ x: number;
1573
+ y: number;
1574
+ }[];
1575
+ yAxisID: string;
1576
+ })[];
1577
+ export { datasets_25 as datasets };
1578
+ }
1579
+ export { data_25 as data };
1561
1580
  export namespace options_38 {
1581
+ let title_14: string;
1582
+ export { title_14 as title };
1583
+ export namespace axes_5 {
1584
+ let x_9: {
1585
+ label: string;
1586
+ }[];
1587
+ export { x_9 as x };
1588
+ let y_8: {
1589
+ label: string;
1590
+ position: string;
1591
+ }[];
1592
+ export { y_8 as y };
1593
+ }
1594
+ export { axes_5 as axes };
1595
+ export namespace chartOptions_1 {
1596
+ let enableDragAnnotation_2: boolean;
1597
+ export { enableDragAnnotation_2 as enableDragAnnotation };
1598
+ }
1599
+ export { chartOptions_1 as chartOptions };
1600
+ export namespace legend_6 {
1601
+ let display_3: boolean;
1602
+ export { display_3 as display };
1603
+ }
1604
+ export { legend_6 as legend };
1562
1605
  export namespace additionalAxesOptions_7 {
1563
1606
  export namespace range_4 {
1564
- export namespace x_9 {
1607
+ namespace y2 {
1565
1608
  let min_7: number;
1566
1609
  export { min_7 as min };
1567
1610
  let max_7: number;
1568
1611
  export { max_7 as max };
1569
1612
  }
1570
- export { x_9 as x };
1571
- export namespace y_8 {
1613
+ }
1614
+ export { range_4 as range };
1615
+ }
1616
+ export { additionalAxesOptions_7 as additionalAxesOptions };
1617
+ export namespace annotations_6 {
1618
+ let showAnnotations_6: boolean;
1619
+ export { showAnnotations_6 as showAnnotations };
1620
+ let enableDragAnnotation_3: boolean;
1621
+ export { enableDragAnnotation_3 as enableDragAnnotation };
1622
+ let annotationsData_6: ({
1623
+ enableDrag: boolean;
1624
+ type: string;
1625
+ xMin: number;
1626
+ xMax: number;
1627
+ yMin: number;
1628
+ yMax: number;
1629
+ color: string;
1630
+ yScaleID?: undefined;
1631
+ resizable?: undefined;
1632
+ } | {
1633
+ enableDrag: boolean;
1634
+ yScaleID: string;
1635
+ resizable: boolean;
1636
+ type: string;
1637
+ xMin: number;
1638
+ xMax: number;
1639
+ yMin: number;
1640
+ yMax: number;
1641
+ color: string;
1642
+ })[];
1643
+ export { annotationsData_6 as annotationsData };
1644
+ }
1645
+ export { annotations_6 as annotations };
1646
+ }
1647
+ export { options_38 as options };
1648
+ }
1649
+ export { chart_45 as chart };
1650
+ }
1651
+ export { args_47 as args };
1652
+ }
1653
+ export function ChartFillerPlugin(args: any): import("react/jsx-runtime").JSX.Element;
1654
+ export namespace ChartFillerPlugin {
1655
+ export namespace args_48 {
1656
+ export namespace chart_46 {
1657
+ export namespace options_39 {
1658
+ export namespace additionalAxesOptions_8 {
1659
+ export namespace range_5 {
1660
+ export namespace x_10 {
1572
1661
  let min_8: number;
1573
1662
  export { min_8 as min };
1574
1663
  let max_8: number;
1575
1664
  export { max_8 as max };
1576
1665
  }
1577
- export { y_8 as y };
1666
+ export { x_10 as x };
1667
+ export namespace y_9 {
1668
+ let min_9: number;
1669
+ export { min_9 as min };
1670
+ let max_9: number;
1671
+ export { max_9 as max };
1672
+ }
1673
+ export { y_9 as y };
1578
1674
  }
1579
- export { range_4 as range };
1675
+ export { range_5 as range };
1580
1676
  }
1581
- export { additionalAxesOptions_7 as additionalAxesOptions };
1677
+ export { additionalAxesOptions_8 as additionalAxesOptions };
1582
1678
  }
1583
- export { options_38 as options };
1584
- export namespace data_25 {
1585
- let datasets_25: {
1679
+ export { options_39 as options };
1680
+ export namespace data_26 {
1681
+ let datasets_26: {
1586
1682
  label: string;
1587
1683
  showPoints: boolean;
1588
1684
  backgroundColor: string;
@@ -1592,13 +1688,13 @@ export namespace ChartFillerPlugin {
1592
1688
  y: number;
1593
1689
  }[];
1594
1690
  }[];
1595
- export { datasets_25 as datasets };
1691
+ export { datasets_26 as datasets };
1596
1692
  }
1597
- export { data_25 as data };
1693
+ export { data_26 as data };
1598
1694
  }
1599
- export { chart_45 as chart };
1695
+ export { chart_46 as chart };
1600
1696
  }
1601
- export { args_47 as args };
1697
+ export { args_48 as args };
1602
1698
  }
1603
1699
  import { LineChart } from './line-chart';
1604
1700
  declare namespace basicChart { }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oliasoft-open-source/charts-library",
3
- "version": "4.7.3",
3
+ "version": "4.7.4",
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
  "resolutions": {