@react-fabric/chart 1.0.0-beta.59 → 1.0.0-beta.60
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/cjs/types/utils.js +1 -4
- package/dist/esm/types/utils.js +1 -4
- package/dist/types/charts/Generic.d.ts +1 -1
- package/dist/types/types/index.d.ts +1 -1
- package/package.json +4 -4
- package/src/charts/Generic.tsx +1 -1
- package/src/charts/MapSeries.tsx +1 -1
- package/src/charts/TimeSeries.tsx +1 -6
- package/src/types/index.ts +1 -1
- package/src/types/utils.ts +0 -1
package/dist/cjs/types/utils.js
CHANGED
|
@@ -69,10 +69,7 @@ var timeSeriesRenderer = function timeSeriesRenderer(opt) {
|
|
|
69
69
|
table.push("<tr><th>".concat(utilities.Format.date(ax[0]), "</th>"));
|
|
70
70
|
series.forEach(function (s) {
|
|
71
71
|
var _s$data$i$, _s$data;
|
|
72
|
-
return (
|
|
73
|
-
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
|
74
|
-
table.push("<td class=\"text-end\">".concat(utilities.Format.number((_s$data$i$ = (_s$data = s.data) === null || _s$data === void 0 || (_s$data = _s$data[i]) === null || _s$data === void 0 ? void 0 : _s$data[1]) !== null && _s$data$i$ !== void 0 ? _s$data$i$ : 0), "</td>"))
|
|
75
|
-
);
|
|
72
|
+
return table.push("<td class=\"text-end\">".concat(utilities.Format.number((_s$data$i$ = (_s$data = s.data) === null || _s$data === void 0 || (_s$data = _s$data[i]) === null || _s$data === void 0 ? void 0 : _s$data[1]) !== null && _s$data$i$ !== void 0 ? _s$data$i$ : 0), "</td>"));
|
|
76
73
|
});
|
|
77
74
|
table.push("</tr>");
|
|
78
75
|
});
|
package/dist/esm/types/utils.js
CHANGED
|
@@ -69,10 +69,7 @@ var timeSeriesRenderer = function timeSeriesRenderer(opt) {
|
|
|
69
69
|
table.push("<tr><th>".concat(Format.date(ax[0]), "</th>"));
|
|
70
70
|
series.forEach(function (s) {
|
|
71
71
|
var _s$data$i$, _s$data;
|
|
72
|
-
return (
|
|
73
|
-
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
|
74
|
-
table.push("<td class=\"text-end\">".concat(Format.number((_s$data$i$ = (_s$data = s.data) === null || _s$data === void 0 || (_s$data = _s$data[i]) === null || _s$data === void 0 ? void 0 : _s$data[1]) !== null && _s$data$i$ !== void 0 ? _s$data$i$ : 0), "</td>"))
|
|
75
|
-
);
|
|
72
|
+
return table.push("<td class=\"text-end\">".concat(Format.number((_s$data$i$ = (_s$data = s.data) === null || _s$data === void 0 || (_s$data = _s$data[i]) === null || _s$data === void 0 ? void 0 : _s$data[1]) !== null && _s$data$i$ !== void 0 ? _s$data$i$ : 0), "</td>"));
|
|
76
73
|
});
|
|
77
74
|
table.push("</tr>");
|
|
78
75
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type EChartsOption, type EChartsType } from "echarts";
|
|
2
2
|
import { type FC, type Ref } from "react";
|
|
3
|
-
import { Theme } from "../types";
|
|
3
|
+
import { type Theme } from "../types";
|
|
4
4
|
export interface GenericProps extends Omit<EChartsOption, "title"> {
|
|
5
5
|
chartRef?: Ref<EChartsType>;
|
|
6
6
|
title?: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BarSeriesOption, PieSeriesOption, type EChartsOption } from "echarts";
|
|
1
|
+
import { type BarSeriesOption, type PieSeriesOption, type EChartsOption } from "echarts";
|
|
2
2
|
export type Theme = "default" | "activity" | "cloud" | "qualitative" | "diverging" | "sequential" | "spectral" | "uber" | "fireice" | "warming" | "sunrise" | "ocean" | "wine" | "red" | "green" | "blue";
|
|
3
3
|
export interface BaseChart {
|
|
4
4
|
title?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-fabric/chart",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.60",
|
|
4
4
|
"description": "RUF: Charting package",
|
|
5
5
|
"author": "Adarsh Pastakia <adarshpastakia@outlook.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"watch": "npm-run-all -p watch:rollup watch:dts"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@react-fabric/core": "^1.0.0-beta.
|
|
39
|
-
"@react-fabric/utilities": "^1.0.0-beta.
|
|
38
|
+
"@react-fabric/core": "^1.0.0-beta.60",
|
|
39
|
+
"@react-fabric/utilities": "^1.0.0-beta.60",
|
|
40
40
|
"classnames": "~2.5.1",
|
|
41
41
|
"color": "~5.0.2",
|
|
42
42
|
"date-fns": "~4.1.0",
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
"node": ">=18.12.0",
|
|
54
54
|
"npm": ">=8.19.0"
|
|
55
55
|
},
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "a79f053ee7e13422c06d7d9c35d4f0c2610cdf5d"
|
|
57
57
|
}
|
package/src/charts/Generic.tsx
CHANGED
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
type FC,
|
|
32
32
|
type Ref,
|
|
33
33
|
} from "react";
|
|
34
|
-
import { Theme } from "../types";
|
|
34
|
+
import { type Theme } from "../types";
|
|
35
35
|
import { ChartContainer } from "../wrapper/ChartContainer";
|
|
36
36
|
import { ChartWrapper } from "../wrapper/ChartWrapper";
|
|
37
37
|
import { PaletteSelect } from "../wrapper/PaletteSelect";
|
package/src/charts/MapSeries.tsx
CHANGED
|
@@ -31,7 +31,7 @@ import * as echarts from "echarts";
|
|
|
31
31
|
import { type EChartsOption, type EChartsType } from "echarts";
|
|
32
32
|
import { memo, useEffect, useRef, useState, type FC } from "react";
|
|
33
33
|
import { ChartPalette } from "../theme/palettes";
|
|
34
|
-
import { type BaseChart
|
|
34
|
+
import { type BaseChart } from "../types";
|
|
35
35
|
import { countRenderer } from "../types/utils";
|
|
36
36
|
import { ChartContainer } from "../wrapper/ChartContainer";
|
|
37
37
|
import { ChartWrapper } from "../wrapper/ChartWrapper";
|
|
@@ -29,12 +29,7 @@ import {
|
|
|
29
29
|
useMemoDebugger,
|
|
30
30
|
} from "@react-fabric/core";
|
|
31
31
|
import { isEmpty } from "@react-fabric/utilities";
|
|
32
|
-
import {
|
|
33
|
-
ECElementEvent,
|
|
34
|
-
ECharts,
|
|
35
|
-
type EChartsOption,
|
|
36
|
-
type EChartsType,
|
|
37
|
-
} from "echarts";
|
|
32
|
+
import { type ECharts, type EChartsOption } from "echarts";
|
|
38
33
|
import { memo, useCallback, useEffect, useRef, useState, type FC } from "react";
|
|
39
34
|
import { type BaseChart, type TimeSeriesType } from "../types";
|
|
40
35
|
import { timeSeriesRenderer } from "../types/utils";
|
package/src/types/index.ts
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
22
22
|
*/
|
|
23
23
|
|
|
24
|
-
import { BarSeriesOption, PieSeriesOption, type EChartsOption } from "echarts";
|
|
24
|
+
import { type BarSeriesOption, type PieSeriesOption, type EChartsOption } from "echarts";
|
|
25
25
|
|
|
26
26
|
export type Theme =
|
|
27
27
|
| "default"
|
package/src/types/utils.ts
CHANGED
|
@@ -117,7 +117,6 @@ export const timeSeriesRenderer = (opt: KeyValue) => {
|
|
|
117
117
|
series[0].data.forEach((ax: AnyObject, i: number) => {
|
|
118
118
|
table.push(`<tr><th>${Format.date(ax[0])}</th>`);
|
|
119
119
|
series.forEach((s: MultiSeries) =>
|
|
120
|
-
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
|
121
120
|
table.push(
|
|
122
121
|
`<td class="text-end">${Format.number(s.data?.[i]?.[1] ?? 0)}</td>`,
|
|
123
122
|
),
|