mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-09-30 22:26:38 +08:00
39 lines
789 B
TypeScript
39 lines
789 B
TypeScript
'use client';
|
|
|
|
import ReactEChartsCore from 'echarts-for-react/lib/core';
|
|
import * as echarts from 'echarts/core';
|
|
import {
|
|
BarChart,
|
|
LineChart,
|
|
type BarSeriesOption,
|
|
type LineSeriesOption,
|
|
} from 'echarts/charts';
|
|
import {
|
|
GridComponent,
|
|
LegendComponent,
|
|
TooltipComponent,
|
|
type GridComponentOption,
|
|
type LegendComponentOption,
|
|
type TooltipComponentOption,
|
|
} from 'echarts/components';
|
|
import { CanvasRenderer } from 'echarts/renderers';
|
|
|
|
echarts.use([
|
|
GridComponent,
|
|
LegendComponent,
|
|
TooltipComponent,
|
|
LineChart,
|
|
BarChart,
|
|
CanvasRenderer,
|
|
]);
|
|
|
|
export type AppChartOption = echarts.ComposeOption<
|
|
| GridComponentOption
|
|
| LegendComponentOption
|
|
| TooltipComponentOption
|
|
| LineSeriesOption
|
|
| BarSeriesOption
|
|
>;
|
|
|
|
export { ReactEChartsCore, echarts };
|