vue-chrts 2.1.0-beta-7 → 2.1.0-beta-9
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/components/AreaChart/{types.d.ts → AreaChart.d.ts} +2 -22
- package/dist/components/AreaChart/AreaChart.js +95 -116
- package/dist/components/AreaChart/AreaChart.vue.d.ts +1 -1
- package/dist/components/AreaChart/index.d.ts +2 -0
- package/dist/components/BarChart/{types.d.ts → BarChart.d.ts} +12 -11
- package/dist/components/BarChart/BarChart.js +9 -9
- package/dist/components/BarChart/BarChart.vue.d.ts +1 -1
- package/dist/components/BarChart/index.d.ts +2 -0
- package/dist/components/BubbleChart/{types.d.ts → BubbleChart.d.ts} +2 -1
- package/dist/components/BubbleChart/BubbleChart.js +4 -4
- package/dist/components/BubbleChart/BubbleChart.vue.d.ts +1 -1
- package/dist/components/BubbleChart/index.d.ts +2 -0
- package/dist/components/DagreGraph/DagreGraph.d.ts +254 -0
- package/dist/components/DagreGraph/DagreGraph.js +65 -62
- package/dist/components/DagreGraph/DagreGraph.vue.d.ts +1 -1
- package/dist/components/DagreGraph/index.d.ts +2 -0
- package/dist/components/DagreGraph/types.d.ts +2 -1
- package/dist/components/DonutChart/{types.d.ts → DonutChart.d.ts} +7 -7
- package/dist/components/DonutChart/DonutChart.js +3 -3
- package/dist/components/DonutChart/DonutChart.vue.d.ts +1 -1
- package/dist/components/DonutChart/DonutChart2.js +2 -2
- package/dist/components/DonutChart/DonutChart3.js +4 -0
- package/dist/components/DonutChart/index.d.ts +2 -0
- package/dist/components/DualChart/DualChart.d.ts +195 -0
- package/dist/components/DualChart/DualChart.js +125 -122
- package/dist/components/DualChart/DualChart.vue.d.ts +1 -1
- package/dist/components/DualChart/index.d.ts +2 -0
- package/dist/components/DualChart/types.d.ts +2 -2
- package/dist/components/GanttChart/{types.d.ts → GanttChart.d.ts} +2 -1
- package/dist/components/GanttChart/GanttChart.js +6 -6
- package/dist/components/GanttChart/GanttChart.vue.d.ts +1 -1
- package/dist/components/GanttChart/index.d.ts +2 -0
- package/dist/components/LineChart/{types.d.ts → LineChart.d.ts} +1 -1
- package/dist/components/LineChart/LineChart.js +7 -12
- package/dist/components/LineChart/LineChart.vue.d.ts +1 -1
- package/dist/components/LineChart/index.d.ts +2 -0
- package/dist/components/Maps/DottedMap/DottedMap.js +2 -2
- package/dist/components/Maps/DottedMap/DottedMap.vue.d.ts +2 -2
- package/dist/components/Maps/DottedMap/core.js +2 -2
- package/dist/components/Maps/DottedMap/core.vue.d.ts +2 -2
- package/dist/components/Maps/DottedMap/mapUtils.js +22 -22
- package/dist/components/Maps/TopoJSONMap/TopoJSONMap.js +5 -5
- package/dist/components/Maps/TopoJSONMap/TopoJSONMap.vue.d.ts +2 -2
- package/dist/components/Maps/TopoJSONMap/types.d.ts +2 -1
- package/dist/components/Maps/index.d.ts +5 -0
- package/dist/components/SankeyChart/SankeyChart.d.ts +117 -0
- package/dist/components/SankeyChart/SankeyChart.js +59 -56
- package/dist/components/SankeyChart/SankeyChart.vue.d.ts +1 -1
- package/dist/components/SankeyChart/index.d.ts +2 -0
- package/dist/components/SankeyChart/types.d.ts +2 -1
- package/dist/components/Tooltip.js +5 -5
- package/dist/enums.d.ts +32 -0
- package/dist/index.d.ts +12 -14
- package/dist/index.js +31 -31
- package/dist/types.d.ts +2 -46
- package/package.json +16 -10
- package/dist/components/DonutChart/types.js +0 -4
- package/dist/node_modules/.pnpm/@turf_boolean-point-in-polygon@7.3.1/node_modules/@turf/boolean-point-in-polygon/dist/esm/index.js +0 -28
- package/dist/node_modules/.pnpm/@turf_invariant@7.3.1/node_modules/@turf/invariant/dist/esm/index.js +0 -20
- package/dist/node_modules/.pnpm/mgrs@1.0.0/node_modules/mgrs/mgrs.js +0 -222
- package/dist/node_modules/.pnpm/point-in-polygon-hao@1.2.4/node_modules/point-in-polygon-hao/dist/esm/index.js +0 -25
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/Point.js +0 -24
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/Proj.js +0 -46
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/adjust_axis.js +0 -31
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/checkSanity.js +0 -15
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/adjust_lat.js +0 -8
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/adjust_lon.js +0 -8
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/adjust_zone.js +0 -13
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/asinhy.js +0 -9
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/asinz.js +0 -6
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/clens.js +0 -8
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/clens_cmplx.js +0 -10
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/cosh.js +0 -7
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/e0fn.js +0 -6
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/e1fn.js +0 -6
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/e2fn.js +0 -6
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/e3fn.js +0 -6
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/gN.js +0 -7
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/gatg.js +0 -8
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/hypot.js +0 -8
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/imlfn.js +0 -11
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/iqsfnz.js +0 -13
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/log1py.js +0 -7
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/mlfn.js +0 -6
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/msfnz.js +0 -7
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/phi2z.js +0 -10
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/pj_enfn.js +0 -10
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/pj_inv_mlfn.js +0 -14
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/pj_mlfn.js +0 -6
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/qsfnz.js +0 -7
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/sign.js +0 -6
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/sinh.js +0 -7
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/srat.js +0 -6
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/toPoint.js +0 -10
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/tsfnz.js +0 -8
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/vincenty.js +0 -33
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/constants/Datum.js +0 -1278
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/constants/Ellipsoid.js +0 -226
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/constants/PrimeMeridian.js +0 -17
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/constants/units.js +0 -25
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/constants/values.js +0 -22
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/core.js +0 -65
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/datum.js +0 -8
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/datumUtils.js +0 -82
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/datum_transform.js +0 -94
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/defs.js +0 -39
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/deriveConstants.js +0 -30
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/extend.js +0 -12
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/global.js +0 -9
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/index.js +0 -25
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/match.js +0 -11
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/nadgrid.js +0 -128
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/parseCode.js +0 -47
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projString.js +0 -119
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/aea.js +0 -43
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/aeqd.js +0 -36
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/bonne.js +0 -55
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/cass.js +0 -52
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/cea.js +0 -36
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/eqc.js +0 -27
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/eqdc.js +0 -48
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/eqearth.js +0 -30
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/etmerc.js +0 -54
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/gauss.js +0 -27
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/geocent.js +0 -26
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/geos.js +0 -49
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/gnom.js +0 -28
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/krovak.js +0 -31
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/laea.js +0 -134
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/lcc.js +0 -61
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/longlat.js +0 -19
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/merc.js +0 -49
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/mill.js +0 -26
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/moll.js +0 -37
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/nzmg.js +0 -48
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/ob_tran.js +0 -173
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/omerc.js +0 -58
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/ortho.js +0 -28
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/poly.js +0 -68
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/qsc.js +0 -67
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/robin.js +0 -104
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/sinu.js +0 -47
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/somerc.js +0 -34
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/stere.js +0 -46
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/sterea.js +0 -33
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/tmerc.js +0 -60
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/tpers.js +0 -110
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/utm.js +0 -22
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/vandg.js +0 -34
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections.js +0 -34
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/transform.js +0 -49
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/projs.js +0 -38
- package/dist/node_modules/.pnpm/robust-predicates@3.0.2/node_modules/robust-predicates/esm/orient2d.js +0 -23
- package/dist/node_modules/.pnpm/robust-predicates@3.0.2/node_modules/robust-predicates/esm/util.js +0 -30
- package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/PROJJSONBuilder2015.js +0 -9
- package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/PROJJSONBuilder2019.js +0 -20
- package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/PROJJSONBuilderBase.js +0 -171
- package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/buildPROJJSON.js +0 -11
- package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/detectWKTVersion.js +0 -7
- package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/index.js +0 -104
- package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/parser.js +0 -117
- package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/process.js +0 -89
- package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/transformPROJJSON.js +0 -73
- package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/util.js +0 -12
- /package/dist/{types.js → enums.js} +0 -0
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import { axisFormatter, CrosshairConfig, AxisConfig, BulletLegendItemInterface, TooltipConfig } from '../../types';
|
|
2
|
+
import { LegendPosition, Orientation, CurveType } from '../../enums';
|
|
3
|
+
export interface DualChartProps<T> {
|
|
4
|
+
/**
|
|
5
|
+
* The data to be displayed in the dual chart.
|
|
6
|
+
* Each element of the array represents a data point.
|
|
7
|
+
* The structure of 'T' should be compatible with the chart's rendering logic.
|
|
8
|
+
*/
|
|
9
|
+
data: T[];
|
|
10
|
+
/**
|
|
11
|
+
* The height of the chart in pixels.
|
|
12
|
+
*/
|
|
13
|
+
height: number;
|
|
14
|
+
/**
|
|
15
|
+
* Optional label for the x-axis.
|
|
16
|
+
*/
|
|
17
|
+
xLabel?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Optional label for the y-axis (used for both bar and line by default).
|
|
20
|
+
*/
|
|
21
|
+
yLabel?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Optional label for the secondary y-axis (line chart).
|
|
24
|
+
*/
|
|
25
|
+
yLabelSecondary?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Optional padding applied to the chart.
|
|
28
|
+
* Allows specifying individual padding values for the top, right, bottom, and left sides.
|
|
29
|
+
*/
|
|
30
|
+
padding?: {
|
|
31
|
+
top: number;
|
|
32
|
+
right: number;
|
|
33
|
+
bottom: number;
|
|
34
|
+
left: number;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* A record mapping bar category keys to `BulletLegendItemInterface` objects.
|
|
38
|
+
* This defines the visual representation and labels for bar categories in the chart's legend.
|
|
39
|
+
*/
|
|
40
|
+
barCategories: Record<string, BulletLegendItemInterface>;
|
|
41
|
+
/**
|
|
42
|
+
* A record mapping line category keys to `BulletLegendItemInterface` objects.
|
|
43
|
+
* This defines the visual representation and labels for line categories in the chart's legend.
|
|
44
|
+
*/
|
|
45
|
+
lineCategories: Record<string, BulletLegendItemInterface>;
|
|
46
|
+
/**
|
|
47
|
+
* An array of property keys from the data object type 'T' to be used for the bar chart y-axis values.
|
|
48
|
+
*/
|
|
49
|
+
barYAxis: (keyof T)[];
|
|
50
|
+
/**
|
|
51
|
+
* An array of property keys from the data object type 'T' to be used for the line chart y-axis values.
|
|
52
|
+
*/
|
|
53
|
+
lineYAxis: (keyof T)[];
|
|
54
|
+
/**
|
|
55
|
+
* @param {number|Date} tick - The value of the tick. This can be a number or a Date object depending on the scale of the x-axis.
|
|
56
|
+
* @param {number} i - The index of the tick in the `ticks` array.
|
|
57
|
+
* @param {(number[]|Date[])} ticks - An array of all tick values for the x-axis.
|
|
58
|
+
* @returns {string} The formatted string representation of the tick.
|
|
59
|
+
*/
|
|
60
|
+
xFormatter?: axisFormatter;
|
|
61
|
+
/**
|
|
62
|
+
* @param {number|Date} tick - The value of the tick. This can be a number or a Date object depending on the scale of the y-axis.
|
|
63
|
+
* @param {number} i - The index of the tick in the `ticks` array.
|
|
64
|
+
* @param {(number[]|Date[])} ticks - An array of all tick values for the y-axis.
|
|
65
|
+
* @returns {string} The formatted string representation of the tick.
|
|
66
|
+
*/
|
|
67
|
+
yFormatter?: axisFormatter;
|
|
68
|
+
/**
|
|
69
|
+
* Use custom formatter for tooltip titles
|
|
70
|
+
*/
|
|
71
|
+
tooltipTitleFormatter?: (data: T) => string | number;
|
|
72
|
+
/**
|
|
73
|
+
* The type of curve to use for the line chart lines.
|
|
74
|
+
* See `CurveType` for available options.
|
|
75
|
+
*/
|
|
76
|
+
curveType?: CurveType;
|
|
77
|
+
/**
|
|
78
|
+
* The width of the line in pixels. Default is 2px.
|
|
79
|
+
*/
|
|
80
|
+
lineWidth?: number;
|
|
81
|
+
/**
|
|
82
|
+
* The desired number of ticks on the x-axis.
|
|
83
|
+
*/
|
|
84
|
+
xNumTicks?: number;
|
|
85
|
+
/**
|
|
86
|
+
* Force specific ticks on the x-axis.
|
|
87
|
+
*/
|
|
88
|
+
xExplicitTicks?: (number | string | Date)[];
|
|
89
|
+
/**
|
|
90
|
+
* Force only first and last ticks on the x-axis.
|
|
91
|
+
*/
|
|
92
|
+
minMaxTicksOnly?: boolean;
|
|
93
|
+
/**
|
|
94
|
+
* The desired number of ticks on the y-axis.
|
|
95
|
+
*/
|
|
96
|
+
yNumTicks?: number;
|
|
97
|
+
/**
|
|
98
|
+
* If `true`, hides the chart legend.
|
|
99
|
+
*/
|
|
100
|
+
hideLegend?: boolean;
|
|
101
|
+
/**
|
|
102
|
+
* If `true`, hides the chart tooltip.
|
|
103
|
+
*/
|
|
104
|
+
hideTooltip?: boolean;
|
|
105
|
+
/**
|
|
106
|
+
* Optional position for the legend, if applicable.
|
|
107
|
+
* See `LegendPosition` for available options.
|
|
108
|
+
*/
|
|
109
|
+
legendPosition?: LegendPosition;
|
|
110
|
+
/**
|
|
111
|
+
* Optional style object for the legend container. Allows custom CSS styling.
|
|
112
|
+
*/
|
|
113
|
+
legendStyle?: string | Record<string, string>;
|
|
114
|
+
/**
|
|
115
|
+
* If `true`, displays a domain line (axis line) along the x-axis.
|
|
116
|
+
*/
|
|
117
|
+
xDomainLine?: boolean;
|
|
118
|
+
/**
|
|
119
|
+
* If `true`, displays a domain line (axis line) along the y-axis.
|
|
120
|
+
*/
|
|
121
|
+
yDomainLine?: boolean;
|
|
122
|
+
/**
|
|
123
|
+
* If `true`, displays tick lines on the x-axis.
|
|
124
|
+
*/
|
|
125
|
+
xTickLine?: boolean;
|
|
126
|
+
/**
|
|
127
|
+
* If `true`, displays tick lines on the y-axis.
|
|
128
|
+
*/
|
|
129
|
+
yTickLine?: boolean;
|
|
130
|
+
/**
|
|
131
|
+
* If `true`, displays grid lines along the x-axis.
|
|
132
|
+
*/
|
|
133
|
+
xGridLine?: boolean;
|
|
134
|
+
/**
|
|
135
|
+
* If `true`, displays grid lines along the y-axis.
|
|
136
|
+
*/
|
|
137
|
+
yGridLine?: boolean;
|
|
138
|
+
/**
|
|
139
|
+
* If `true`, hide the x-axis.
|
|
140
|
+
*/
|
|
141
|
+
hideXAxis?: boolean;
|
|
142
|
+
/**
|
|
143
|
+
* If `true`, hide the y-axis.
|
|
144
|
+
*/
|
|
145
|
+
hideYAxis?: boolean;
|
|
146
|
+
/**
|
|
147
|
+
* Crosshair configuration object for customizing the appearance of the crosshair line.
|
|
148
|
+
*/
|
|
149
|
+
crosshairConfig?: CrosshairConfig;
|
|
150
|
+
/**
|
|
151
|
+
* Axis configuration object for customizing the appearance of the axes.
|
|
152
|
+
*/
|
|
153
|
+
xAxisConfig?: AxisConfig;
|
|
154
|
+
/**
|
|
155
|
+
* Axis configuration object for customizing the appearance of the axes.
|
|
156
|
+
*/
|
|
157
|
+
yAxisConfig?: AxisConfig;
|
|
158
|
+
/**
|
|
159
|
+
* The domain for the y-axis, specified as a tuple of two values.
|
|
160
|
+
*/
|
|
161
|
+
yDomain?: [number | undefined, number | undefined];
|
|
162
|
+
/**
|
|
163
|
+
* The domain for the x-axis, specified as a tuple of two values.
|
|
164
|
+
*/
|
|
165
|
+
xDomain?: [number | undefined, number | undefined];
|
|
166
|
+
/**
|
|
167
|
+
* If `true`, creates stacked bars.
|
|
168
|
+
*/
|
|
169
|
+
stacked?: boolean;
|
|
170
|
+
/**
|
|
171
|
+
* The padding between groups of bars in pixels.
|
|
172
|
+
*/
|
|
173
|
+
groupPadding?: number;
|
|
174
|
+
/**
|
|
175
|
+
* Fractional padding between the bars in the range of [0,1). Default: 0.2
|
|
176
|
+
*/
|
|
177
|
+
barPadding?: number;
|
|
178
|
+
/**
|
|
179
|
+
* Rounded corners for top bars. Boolean or number (to set the radius in pixels). Default: 2
|
|
180
|
+
*/
|
|
181
|
+
radius?: number;
|
|
182
|
+
/**
|
|
183
|
+
* The orientation of the bars (vertical or horizontal).
|
|
184
|
+
* See `Orientation` for available options.
|
|
185
|
+
*/
|
|
186
|
+
orientation?: Orientation;
|
|
187
|
+
/**
|
|
188
|
+
* Animation duration in milliseconds for the chart components.
|
|
189
|
+
*/
|
|
190
|
+
duration?: number;
|
|
191
|
+
/**
|
|
192
|
+
* Configuration object for the chart tooltip.
|
|
193
|
+
*/
|
|
194
|
+
tooltip?: TooltipConfig;
|
|
195
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Orientation as
|
|
3
|
-
import { VisXYContainer as
|
|
4
|
-
import
|
|
5
|
-
import { LegendPosition as
|
|
6
|
-
const
|
|
1
|
+
import { defineComponent as G, useSlots as z, useTemplateRef as H, ref as X, computed as y, openBlock as r, createElementBlock as f, normalizeStyle as x, createVNode as k, unref as i, withCtx as j, createBlock as u, createCommentVNode as c, Fragment as q, renderList as $, mergeProps as h, createElementVNode as R, renderSlot as B } from "vue";
|
|
2
|
+
import { Orientation as g, CurveType as Y, Position as w, StackedBar as U, GroupedBar as I } from "@unovis/ts";
|
|
3
|
+
import { VisXYContainer as J, VisTooltip as K, VisGroupedBar as Q, VisStackedBar as Z, VisLine as _, VisAxis as P, VisCrosshair as ee, VisBulletLegend as te } from "@unovis/vue";
|
|
4
|
+
import ie from "../Tooltip.js";
|
|
5
|
+
import { LegendPosition as ae } from "../../enums.js";
|
|
6
|
+
const ne = {
|
|
7
7
|
ref: "slotWrapper",
|
|
8
8
|
style: { display: "none" }
|
|
9
|
-
},
|
|
9
|
+
}, ce = /* @__PURE__ */ G({
|
|
10
10
|
__name: "DualChart",
|
|
11
11
|
props: {
|
|
12
12
|
data: {},
|
|
@@ -27,7 +27,7 @@ const te = {
|
|
|
27
27
|
xFormatter: {},
|
|
28
28
|
yFormatter: {},
|
|
29
29
|
tooltipTitleFormatter: {},
|
|
30
|
-
curveType: { default:
|
|
30
|
+
curveType: { default: Y.MonotoneX },
|
|
31
31
|
lineWidth: { default: 2 },
|
|
32
32
|
xNumTicks: {},
|
|
33
33
|
xExplicitTicks: {},
|
|
@@ -35,7 +35,7 @@ const te = {
|
|
|
35
35
|
yNumTicks: {},
|
|
36
36
|
hideLegend: { type: Boolean, default: !1 },
|
|
37
37
|
hideTooltip: { type: Boolean, default: !1 },
|
|
38
|
-
legendPosition: { default:
|
|
38
|
+
legendPosition: { default: ae.BottomCenter },
|
|
39
39
|
legendStyle: { default: void 0 },
|
|
40
40
|
xDomainLine: { type: Boolean },
|
|
41
41
|
yDomainLine: { type: Boolean },
|
|
@@ -54,163 +54,166 @@ const te = {
|
|
|
54
54
|
groupPadding: { default: 0 },
|
|
55
55
|
barPadding: { default: 0.2 },
|
|
56
56
|
radius: {},
|
|
57
|
-
orientation: { default:
|
|
57
|
+
orientation: { default: g.Vertical },
|
|
58
58
|
duration: { default: 600 },
|
|
59
59
|
tooltip: { default: () => ({
|
|
60
60
|
followCursor: !0
|
|
61
61
|
}) }
|
|
62
62
|
},
|
|
63
63
|
emits: ["click"],
|
|
64
|
-
setup(e, { emit:
|
|
65
|
-
const
|
|
64
|
+
setup(e, { emit: V }) {
|
|
65
|
+
const D = V, t = e, F = z(), m = H("slotWrapper"), s = X();
|
|
66
66
|
if (!t.barYAxis || t.barYAxis.length === 0)
|
|
67
67
|
throw console.error("[DualChart] barYAxis prop is required and must contain at least one field key"), new Error("DualChart: 'barYAxis' is required and must contain at least one field key. Provide an array of property keys from your data type (e.g., ['revenue', 'costs'])");
|
|
68
68
|
if (!t.lineYAxis || t.lineYAxis.length === 0)
|
|
69
69
|
throw console.error("[DualChart] lineYAxis prop is required and must contain at least one field key"), new Error("DualChart: 'lineYAxis' is required and must contain at least one field key. Provide an array of property keys from your data type (e.g., ['profit', 'target'])");
|
|
70
|
-
const
|
|
71
|
-
var
|
|
72
|
-
return (
|
|
73
|
-
},
|
|
70
|
+
const v = y(() => t.barYAxis.map((a) => (d) => d[a])), M = y(() => t.lineYAxis.map((a) => (d) => d[a])), C = (a, d) => {
|
|
71
|
+
var n;
|
|
72
|
+
return (n = Object.values(t.barCategories)[d]) == null ? void 0 : n.color;
|
|
73
|
+
}, b = y(() => ({
|
|
74
74
|
...t.barCategories,
|
|
75
75
|
...t.lineCategories
|
|
76
|
-
})),
|
|
77
|
-
function
|
|
78
|
-
|
|
76
|
+
})), O = y(() => t.legendPosition.startsWith("top")), S = y(() => t.legendPosition.includes("left") ? "flex-start" : t.legendPosition.includes("right") ? "flex-end" : "center");
|
|
77
|
+
function T(a) {
|
|
78
|
+
s.value = a;
|
|
79
79
|
}
|
|
80
|
-
function
|
|
81
|
-
return typeof window > "u" ? "" :
|
|
80
|
+
function N(a) {
|
|
81
|
+
return typeof window > "u" ? "" : m.value ? m.value.innerHTML : "";
|
|
82
82
|
}
|
|
83
|
-
function
|
|
84
|
-
return
|
|
83
|
+
function W(a) {
|
|
84
|
+
return s.value = a, N();
|
|
85
85
|
}
|
|
86
|
-
return (
|
|
87
|
-
style:
|
|
86
|
+
return (a, d) => (r(), f("div", {
|
|
87
|
+
style: x({
|
|
88
88
|
display: "flex",
|
|
89
|
-
flexDirection:
|
|
89
|
+
flexDirection: O.value ? "column-reverse" : "column",
|
|
90
90
|
gap: "var(--vis-legend-spacing)"
|
|
91
91
|
}),
|
|
92
|
-
onClick:
|
|
92
|
+
onClick: d[0] || (d[0] = (n) => D("click", n, s.value))
|
|
93
93
|
}, [
|
|
94
|
-
|
|
94
|
+
k(i(J), {
|
|
95
95
|
padding: e.padding,
|
|
96
96
|
height: e.height,
|
|
97
97
|
duration: e.duration,
|
|
98
98
|
data: e.data
|
|
99
99
|
}, {
|
|
100
|
-
default:
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
100
|
+
default: j(() => {
|
|
101
|
+
var n, A, p;
|
|
102
|
+
return [
|
|
103
|
+
e.hideTooltip ? c("", !0) : (r(), u(i(K), {
|
|
104
|
+
key: 0,
|
|
105
|
+
followCursor: (n = t.tooltip) == null ? void 0 : n.followCursor,
|
|
106
|
+
"show-delay": (A = t.tooltip) == null ? void 0 : A.showDelay,
|
|
107
|
+
"hide-delay": (p = t.tooltip) == null ? void 0 : p.hideDelay,
|
|
108
|
+
triggers: {
|
|
109
|
+
[i(I).selectors.bar]: (l) => {
|
|
110
|
+
var o;
|
|
111
|
+
return T(l), l ? (o = m.value) == null ? void 0 : o.innerHTML : "";
|
|
112
|
+
},
|
|
113
|
+
[i(U).selectors.bar]: (l) => {
|
|
114
|
+
var o;
|
|
115
|
+
return T(l), l ? (o = m.value) == null ? void 0 : o.innerHTML : "";
|
|
116
|
+
}
|
|
110
117
|
},
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
"horizontal-placement": a(L).Right,
|
|
117
|
-
"vertical-placement": a(L).Top
|
|
118
|
-
}, null, 8, ["followCursor", "show-delay", "hide-delay", "triggers", "horizontal-placement", "vertical-placement"])),
|
|
119
|
-
e.stacked ? (r(), d(a(J), {
|
|
120
|
-
key: 2,
|
|
121
|
-
data: e.data,
|
|
122
|
-
x: (i, o) => o,
|
|
123
|
-
y: h.value,
|
|
124
|
-
color: v,
|
|
125
|
-
"rounded-corners": e.radius ?? 0,
|
|
126
|
-
"group-padding": e.groupPadding ?? 0,
|
|
127
|
-
"bar-padding": e.barPadding ?? 0.2,
|
|
128
|
-
orientation: e.orientation ?? a(y).Vertical
|
|
129
|
-
}, null, 8, ["data", "x", "y", "rounded-corners", "group-padding", "bar-padding", "orientation"])) : (r(), d(a(I), {
|
|
130
|
-
key: 1,
|
|
131
|
-
data: e.data,
|
|
132
|
-
x: (i, o) => o,
|
|
133
|
-
y: h.value,
|
|
134
|
-
color: v,
|
|
135
|
-
"rounded-corners": e.radius ?? 0,
|
|
136
|
-
"group-padding": e.groupPadding ?? 0,
|
|
137
|
-
"bar-padding": e.barPadding ?? 0.2,
|
|
138
|
-
orientation: e.orientation ?? a(y).Vertical
|
|
139
|
-
}, null, 8, ["data", "x", "y", "rounded-corners", "group-padding", "bar-padding", "orientation"])),
|
|
140
|
-
(r(!0), m(X, null, j(V.value, (i, o) => {
|
|
141
|
-
var T;
|
|
142
|
-
return r(), d(a(K), {
|
|
143
|
-
key: `line-${o}`,
|
|
118
|
+
"horizontal-placement": i(w).Right,
|
|
119
|
+
"vertical-placement": i(w).Top
|
|
120
|
+
}, null, 8, ["followCursor", "show-delay", "hide-delay", "triggers", "horizontal-placement", "vertical-placement"])),
|
|
121
|
+
e.stacked ? (r(), u(i(Z), {
|
|
122
|
+
key: 2,
|
|
144
123
|
data: e.data,
|
|
145
|
-
x: (
|
|
146
|
-
y:
|
|
147
|
-
color:
|
|
148
|
-
"
|
|
149
|
-
"
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
124
|
+
x: (l, o) => o,
|
|
125
|
+
y: v.value,
|
|
126
|
+
color: C,
|
|
127
|
+
"rounded-corners": e.radius ?? 0,
|
|
128
|
+
"group-padding": e.groupPadding ?? 0,
|
|
129
|
+
"bar-padding": e.barPadding ?? 0.2,
|
|
130
|
+
orientation: e.orientation ?? i(g).Vertical
|
|
131
|
+
}, null, 8, ["data", "x", "y", "rounded-corners", "group-padding", "bar-padding", "orientation"])) : (r(), u(i(Q), {
|
|
132
|
+
key: 1,
|
|
133
|
+
data: e.data,
|
|
134
|
+
x: (l, o) => o,
|
|
135
|
+
y: v.value,
|
|
136
|
+
color: C,
|
|
137
|
+
"rounded-corners": e.radius ?? 0,
|
|
138
|
+
"group-padding": e.groupPadding ?? 0,
|
|
139
|
+
"bar-padding": e.barPadding ?? 0.2,
|
|
140
|
+
orientation: e.orientation ?? i(g).Vertical
|
|
141
|
+
}, null, 8, ["data", "x", "y", "rounded-corners", "group-padding", "bar-padding", "orientation"])),
|
|
142
|
+
(r(!0), f(q, null, $(M.value, (l, o) => {
|
|
143
|
+
var L;
|
|
144
|
+
return r(), u(i(_), {
|
|
145
|
+
key: `line-${o}`,
|
|
146
|
+
data: e.data,
|
|
147
|
+
x: (oe, E) => E,
|
|
148
|
+
y: l,
|
|
149
|
+
color: (L = Object.values(t.lineCategories)[o]) == null ? void 0 : L.color,
|
|
150
|
+
"curve-type": e.curveType ?? i(Y).MonotoneX,
|
|
151
|
+
"line-width": e.lineWidth
|
|
152
|
+
}, null, 8, ["data", "x", "y", "color", "curve-type", "line-width"]);
|
|
153
|
+
}), 128)),
|
|
154
|
+
e.hideXAxis ? c("", !0) : (r(), u(i(P), h({
|
|
155
|
+
key: 3,
|
|
156
|
+
type: "x",
|
|
157
|
+
"tick-format": e.xFormatter,
|
|
158
|
+
label: e.xLabel,
|
|
159
|
+
"grid-line": e.xGridLine,
|
|
160
|
+
"domain-line": !!e.xDomainLine,
|
|
161
|
+
"tick-line": e.xTickLine,
|
|
162
|
+
"num-ticks": e.xNumTicks,
|
|
163
|
+
"tick-values": e.xExplicitTicks,
|
|
164
|
+
minMaxTicksOnly: e.minMaxTicksOnly,
|
|
165
|
+
duration: e.duration
|
|
166
|
+
}, e.xAxisConfig), null, 16, ["tick-format", "label", "grid-line", "domain-line", "tick-line", "num-ticks", "tick-values", "minMaxTicksOnly", "duration"])),
|
|
167
|
+
e.hideYAxis ? c("", !0) : (r(), u(i(P), h({
|
|
168
|
+
key: 4,
|
|
169
|
+
type: "y",
|
|
170
|
+
label: e.yLabel,
|
|
171
|
+
"grid-line": e.orientation !== i(g).Horizontal && e.yGridLine,
|
|
172
|
+
"domain-line": !!e.yDomainLine,
|
|
173
|
+
"tick-format": e.yFormatter,
|
|
174
|
+
"num-ticks": e.yNumTicks,
|
|
175
|
+
"tick-line": e.yTickLine,
|
|
176
|
+
duration: e.duration
|
|
177
|
+
}, e.yAxisConfig), null, 16, ["label", "grid-line", "domain-line", "tick-format", "num-ticks", "tick-line", "duration"])),
|
|
178
|
+
e.hideTooltip ? c("", !0) : (r(), u(i(ee), h({ key: 5 }, e.crosshairConfig, { template: W }), null, 16))
|
|
179
|
+
];
|
|
180
|
+
}),
|
|
178
181
|
_: 1
|
|
179
182
|
}, 8, ["padding", "height", "duration", "data"]),
|
|
180
|
-
t.hideLegend ?
|
|
183
|
+
t.hideLegend ? c("", !0) : (r(), f("div", {
|
|
181
184
|
key: 0,
|
|
182
|
-
style:
|
|
185
|
+
style: x({
|
|
183
186
|
display: "flex",
|
|
184
|
-
justifyContent:
|
|
187
|
+
justifyContent: S.value
|
|
185
188
|
})
|
|
186
189
|
}, [
|
|
187
|
-
|
|
188
|
-
style:
|
|
190
|
+
k(i(te), {
|
|
191
|
+
style: x([
|
|
189
192
|
t.legendStyle,
|
|
190
193
|
"display: flex; gap: var(--vis-legend-spacing);"
|
|
191
194
|
]),
|
|
192
|
-
items: Object.values(
|
|
193
|
-
...
|
|
194
|
-
color: Array.isArray(
|
|
195
|
+
items: Object.values(b.value).map((n) => ({
|
|
196
|
+
...n,
|
|
197
|
+
color: Array.isArray(n.color) ? n.color[0] : n.color
|
|
195
198
|
}))
|
|
196
199
|
}, null, 8, ["style", "items"])
|
|
197
200
|
], 4)),
|
|
198
|
-
|
|
199
|
-
|
|
201
|
+
R("div", ne, [
|
|
202
|
+
i(F).tooltip ? B(a.$slots, "tooltip", {
|
|
200
203
|
key: 0,
|
|
201
|
-
values:
|
|
202
|
-
}) :
|
|
203
|
-
|
|
204
|
-
data:
|
|
205
|
-
categories:
|
|
204
|
+
values: s.value
|
|
205
|
+
}) : s.value ? B(a.$slots, "fallback", { key: 1 }, () => [
|
|
206
|
+
k(ie, {
|
|
207
|
+
data: s.value,
|
|
208
|
+
categories: b.value,
|
|
206
209
|
"title-formatter": t.tooltipTitleFormatter,
|
|
207
|
-
yFormatter: t.orientation ===
|
|
210
|
+
yFormatter: t.orientation === i(g).Horizontal ? t.xFormatter : t.yFormatter
|
|
208
211
|
}, null, 8, ["data", "categories", "title-formatter", "yFormatter"])
|
|
209
|
-
]) :
|
|
212
|
+
]) : c("", !0)
|
|
210
213
|
], 512)
|
|
211
214
|
], 4));
|
|
212
215
|
}
|
|
213
216
|
});
|
|
214
217
|
export {
|
|
215
|
-
|
|
218
|
+
ce as default
|
|
216
219
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DualChartProps } from './
|
|
1
|
+
import { DualChartProps } from './DualChart';
|
|
2
2
|
declare const _default: <T extends {}>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
3
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
4
4
|
readonly onClick?: ((event: MouseEvent, values?: T | undefined) => any) | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { axisFormatter, CrosshairConfig,
|
|
2
|
-
import { CurveType } from '
|
|
1
|
+
import { axisFormatter, CrosshairConfig, AxisConfig, BulletLegendItemInterface, TooltipConfig } from '../../types';
|
|
2
|
+
import { LegendPosition, Orientation, CurveType } from '../../enums';
|
|
3
3
|
export interface DualChartProps<T> {
|
|
4
4
|
/**
|
|
5
5
|
* The data to be displayed in the dual chart.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { BulletLegendItemInterface, CrosshairConfig,
|
|
1
|
+
import { BulletLegendItemInterface, CrosshairConfig, AxisConfig, TooltipConfig } from '../../types';
|
|
2
|
+
import { LegendPosition } from '../../enums';
|
|
2
3
|
export interface GanttChartProps<T> {
|
|
3
4
|
/**
|
|
4
5
|
* The data to be displayed in the timeline chart.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as W, useSlots as B, useTemplateRef as V, ref as A, computed as d,
|
|
1
|
+
import { defineComponent as W, useSlots as B, useTemplateRef as V, ref as A, computed as d, openBlock as c, createElementBlock as p, normalizeStyle as u, createVNode as n, unref as i, withCtx as F, createBlock as H, createCommentVNode as g, mergeProps as P, createElementVNode as S, renderSlot as y } from "vue";
|
|
2
2
|
import { Timeline as x } from "@unovis/ts";
|
|
3
3
|
import { dateFormatter as D } from "../../utils.js";
|
|
4
4
|
import N from "../Tooltip.js";
|
|
5
5
|
import { VisXYContainer as j, VisTimeline as O, VisTooltip as $, VisAxis as G, VisBulletLegend as M } from "@unovis/vue";
|
|
6
|
-
import { LegendPosition as E } from "../../
|
|
6
|
+
import { LegendPosition as E } from "../../enums.js";
|
|
7
7
|
const J = /* @__PURE__ */ W({
|
|
8
8
|
__name: "GanttChart",
|
|
9
9
|
props: {
|
|
@@ -73,7 +73,7 @@ const J = /* @__PURE__ */ W({
|
|
|
73
73
|
duration: l.duration,
|
|
74
74
|
onWheel: L
|
|
75
75
|
}, {
|
|
76
|
-
default:
|
|
76
|
+
default: F(() => [
|
|
77
77
|
n(i(O), {
|
|
78
78
|
x: e.x,
|
|
79
79
|
length: e.length,
|
|
@@ -85,7 +85,7 @@ const J = /* @__PURE__ */ W({
|
|
|
85
85
|
showLabels: e.showLabels,
|
|
86
86
|
onClick: C
|
|
87
87
|
}, null, 8, ["x", "length", "lineWidth", "rowHeight", "type", "color", "labelWidth", "showLabels"]),
|
|
88
|
-
l.hideTooltip ? g("", !0) : (c(),
|
|
88
|
+
l.hideTooltip ? g("", !0) : (c(), H(i($), {
|
|
89
89
|
key: 0,
|
|
90
90
|
followCursor: e.tooltip.followCursor,
|
|
91
91
|
"show-delay": e.tooltip.showDelay,
|
|
@@ -97,7 +97,7 @@ const J = /* @__PURE__ */ W({
|
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
}, null, 8, ["followCursor", "show-delay", "hide-delay", "triggers"])),
|
|
100
|
-
n(i(G),
|
|
100
|
+
n(i(G), P({
|
|
101
101
|
type: "x",
|
|
102
102
|
tickFormat: l.xTickFormat || i(D),
|
|
103
103
|
numTicks: l.xNumTicks,
|
|
@@ -127,7 +127,7 @@ const J = /* @__PURE__ */ W({
|
|
|
127
127
|
}))
|
|
128
128
|
}, null, 8, ["style", "items"])
|
|
129
129
|
], 4)),
|
|
130
|
-
|
|
130
|
+
S("div", {
|
|
131
131
|
ref_key: "slotWrapper",
|
|
132
132
|
ref: m,
|
|
133
133
|
style: { display: "none" }
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { AreaChartProps } from '../AreaChart/
|
|
1
|
+
import { AreaChartProps } from '../AreaChart/AreaChart';
|
|
2
2
|
export type LineChartProps<T> = Omit<AreaChartProps<T>, "hideArea" | "gradientStops">;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as n, useSlots as a, openBlock as r, createBlock as l, mergeProps as p, createSlots as s, withCtx as y, renderSlot as c, normalizeProps as m, guardReactiveProps as d } from "vue";
|
|
2
|
+
import x from "../AreaChart/AreaChart.js";
|
|
3
|
+
const g = /* @__PURE__ */ n({
|
|
4
4
|
__name: "LineChart",
|
|
5
5
|
props: {
|
|
6
6
|
data: {},
|
|
@@ -19,11 +19,6 @@ const T = /* @__PURE__ */ t({
|
|
|
19
19
|
xNumTicks: {},
|
|
20
20
|
xExplicitTicks: {},
|
|
21
21
|
minMaxTicksOnly: { type: Boolean },
|
|
22
|
-
xMinMaxTicksOnly: { type: Boolean },
|
|
23
|
-
yMinMaxTicksOnly: { type: Boolean },
|
|
24
|
-
minMaxTicksOnlyShowGridLines: { type: Boolean },
|
|
25
|
-
xMinMaxTicksOnlyShowGridLines: { type: Boolean },
|
|
26
|
-
yMinMaxTicksOnlyShowGridLines: { type: Boolean },
|
|
27
22
|
yNumTicks: {},
|
|
28
23
|
yExplicitTicks: {},
|
|
29
24
|
hideLegend: { type: Boolean },
|
|
@@ -49,11 +44,11 @@ const T = /* @__PURE__ */ t({
|
|
|
49
44
|
},
|
|
50
45
|
setup(o) {
|
|
51
46
|
const i = o;
|
|
52
|
-
return a(), (e,
|
|
47
|
+
return a(), (e, u) => (r(), l(x, p(i, { "hide-area": !0 }), s({ _: 2 }, [
|
|
53
48
|
e.$slots.tooltip ? {
|
|
54
49
|
name: "tooltip",
|
|
55
|
-
fn: y((
|
|
56
|
-
c(e.$slots, "tooltip", d(
|
|
50
|
+
fn: y((t) => [
|
|
51
|
+
c(e.$slots, "tooltip", m(d(t)))
|
|
57
52
|
]),
|
|
58
53
|
key: "0"
|
|
59
54
|
} : void 0
|
|
@@ -61,5 +56,5 @@ const T = /* @__PURE__ */ t({
|
|
|
61
56
|
}
|
|
62
57
|
});
|
|
63
58
|
export {
|
|
64
|
-
|
|
59
|
+
g as default
|
|
65
60
|
};
|