@codezee/sixtify-brahma 0.2.86 → 0.2.87

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codezee/sixtify-brahma",
3
- "version": "0.2.86",
3
+ "version": "0.2.87",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/hardikranpariya/sixtify-brahma.git"
@@ -0,0 +1,30 @@
1
+ import type { LineSeriesType } from "@mui/x-charts";
2
+ import type { AnchorPosition } from "@mui/x-charts/ChartsLegend/legend.types";
3
+ import type { MakeOptional } from "@mui/x-charts/internals";
4
+ import type { LineChartProps as MuiLineChartProps } from "@mui/x-charts/LineChart";
5
+ type ExtendedLineSeriesType = MakeOptional<LineSeriesType, "type"> & {
6
+ color?: string;
7
+ colorMap?: {
8
+ [key: string]: string;
9
+ };
10
+ strokeWidth?: number;
11
+ getColor?: (value: number, index: number, data: readonly (number | null)[]) => string;
12
+ };
13
+ type LineChartProps = Omit<MuiLineChartProps, "series"> & {
14
+ series: ExtendedLineSeriesType[];
15
+ xAxisData?: string[];
16
+ yAxisLabel?: string;
17
+ xAxisLabel?: string;
18
+ loading?: boolean;
19
+ height?: MuiLineChartProps["height"];
20
+ width?: MuiLineChartProps["width"];
21
+ hideLegend?: boolean;
22
+ legendPosition?: AnchorPosition;
23
+ grid?: {
24
+ horizontal?: boolean;
25
+ vertical?: boolean;
26
+ };
27
+ };
28
+ export declare const LineChart: ({ height, width, skipAnimation, loading, tooltip, series, xAxisData, yAxisLabel, xAxisLabel, hideLegend, legendPosition, grid, ...rest }: LineChartProps) => import("react/jsx-runtime").JSX.Element;
29
+ export {};
30
+ //# sourceMappingURL=LineChart.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LineChart.d.ts","sourceRoot":"","sources":["../../src/Charts/LineChart.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc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0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LineChart = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const material_1 = require("@mui/material");
6
+ const styles_1 = require("@mui/material/styles");
7
+ const LineChart_1 = require("@mui/x-charts/LineChart");
8
+ const StyledLineChart = (0, styles_1.styled)(LineChart_1.LineChart)(({ theme }) => ({
9
+ "& .MuiChartsAxis-tick": {
10
+ stroke: theme.palette.text.secondary,
11
+ },
12
+ "& .MuiChartsAxis-line": {
13
+ stroke: theme.palette.divider,
14
+ },
15
+ "& .MuiChartsAxis-tickLabel": {
16
+ fill: theme.palette.text.secondary,
17
+ fontSize: 12,
18
+ },
19
+ "& .MuiChartsLegend-mark": {
20
+ rx: 4,
21
+ },
22
+ }));
23
+ const LineChart = ({ height = 300, width, skipAnimation = false, loading = false, tooltip, series, xAxisData, yAxisLabel, xAxisLabel, hideLegend = false, legendPosition = { horizontal: "right", vertical: "top" }, grid = { horizontal: false, vertical: false }, ...rest }) => {
24
+ if (loading) {
25
+ return (0, jsx_runtime_1.jsx)(material_1.Skeleton, { height: height, width: width, variant: "rectangular" });
26
+ }
27
+ const xAxisConfig = xAxisData
28
+ ? [
29
+ {
30
+ data: xAxisData,
31
+ scaleType: "point",
32
+ label: xAxisLabel,
33
+ },
34
+ ]
35
+ : undefined;
36
+ const yAxisConfig = yAxisLabel
37
+ ? [
38
+ {
39
+ label: yAxisLabel,
40
+ width: 50,
41
+ },
42
+ ]
43
+ : undefined;
44
+ return ((0, jsx_runtime_1.jsx)(StyledLineChart, { height: height, width: width, series: series, xAxis: xAxisConfig, yAxis: yAxisConfig, skipAnimation: skipAnimation, tooltip: tooltip, grid: grid, slotProps: { legend: { hidden: hideLegend, position: legendPosition } }, ...rest }));
45
+ };
46
+ exports.LineChart = LineChart;
@@ -1,3 +1,4 @@
1
1
  export * from "./BarChart";
2
+ export * from "./LineChart";
2
3
  export * from "./PieChart";
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Charts/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Charts/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC"}
@@ -15,4 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./BarChart"), exports);
18
+ __exportStar(require("./LineChart"), exports);
18
19
  __exportStar(require("./PieChart"), exports);