Skip to content

Commit

Permalink
added line chart
Browse files Browse the repository at this point in the history
  • Loading branch information
theBstar committed Sep 13, 2024
1 parent e726485 commit 8d95166
Show file tree
Hide file tree
Showing 8 changed files with 12,419 additions and 12,385 deletions.
12 changes: 12 additions & 0 deletions package-dist/charts/Linechart/Linechart.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
export type LinechartProps = {
series: {
name: string;
data: Array<number>;
}[];
style: React.CSSProperties;
};
/**
* A pie chart component that displays data in a pie chart format.
*
*/
export default function Linechart(props: LinechartProps): import("react/jsx-runtime").JSX.Element;
7 changes: 7 additions & 0 deletions package-dist/charts/Linechart/Linechart.stories.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { Meta, StoryObj } from '@storybook/react';
import { default as Linechart } from './Linechart';

declare const meta: Meta<typeof Linechart>;
export default meta;
type Story = StoryObj<typeof Linechart>;
export declare const Default: Story;
4 changes: 4 additions & 0 deletions package-dist/charts/echartTheme.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { EChartsOption } from 'echarts-for-react';

declare const echartTheme: EChartsOption;
export default echartTheme;
2 changes: 2 additions & 0 deletions package-dist/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ export type { AppThemeProviderProps } from './AppThemeProvider';
export { getAntdTheme } from './getAntdTheme';
export { useThemeManager } from './useThemeManager';
export { SpotlightGrid } from './welcomeScreen/SpotlightGrid';
export { default as Linechart } from './charts/Linechart/Linechart';
export type { LinechartProps } from './charts/Linechart/Linechart';
export { default as Piechart } from './charts/Piechart/Piechart';
export type { PiechartProps } from './charts/Piechart/Piechart';
export { default as Metric } from './charts/Metric/Metric';
Expand Down
24,463 changes: 12,235 additions & 12,228 deletions package-dist/ui-gallery.es.js

Large diffs are not rendered by default.

310 changes: 155 additions & 155 deletions package-dist/ui-gallery.umd.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/components/charts/Linechart/Linechart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import EChartsReact from "echarts-for-react";
import { useMemo } from "react";
import echartTheme from "../echartTheme";

export type PiechartProps = {
export type LinechartProps = {
series: { name: string, data: Array<number> }[];
style: React.CSSProperties;
};
Expand All @@ -11,7 +11,7 @@ export type PiechartProps = {
* A pie chart component that displays data in a pie chart format.
*
*/
export default function Linechart(props: PiechartProps) {
export default function Linechart(props: LinechartProps) {
const chartOptions = useMemo(
() => ({
...echartTheme,
Expand Down
2 changes: 2 additions & 0 deletions src/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ export { useThemeManager } from "./useThemeManager";

export { SpotlightGrid } from "./welcomeScreen/SpotlightGrid";

export { default as Linechart } from "./charts/Linechart/Linechart";
export type { LinechartProps } from "./charts/Linechart/Linechart";
export { default as Piechart } from "./charts/Piechart/Piechart";
export type { PiechartProps } from "./charts/Piechart/Piechart";

Expand Down

0 comments on commit 8d95166

Please sign in to comment.