MCPcopy
hub / github.com/d3george/slash-admin / useChart

Function useChart

src/components/chart/useChart.ts:11–16  ·  view source on GitHub ↗
(options: ApexOptions)

Source from the content-addressed store, hash-verified

9import type { ThemeColorPresets, ThemeMode } from "@/types/enum";
10
11export function useChart(options: ApexOptions) {
12 const { themeColorPresets, themeMode } = useSettings();
13
14 const baseOptions = baseCharOptions(themeMode, themeColorPresets) ?? {};
15 return mergeDeepRight(baseOptions, options) as ApexOptions;
16}
17
18const baseCharOptions = (themeMode: ThemeMode, themeColorPresets: ThemeColorPresets): ApexOptions => {
19 const LABEL_TOTAL = {

Callers 14

ChartPieFunction · 0.90
ChartMixedFunction · 0.90
ChartColumnNegativeFunction · 0.90
ChartLineFunction · 0.90
ChartColumnStackedFunction · 0.90
ChartDonutFunction · 0.90
ChartRadarFunction · 0.90
ChartColumnMultipleFunction · 0.90
ChartBarFunction · 0.90
ChartRadialFunction · 0.90
ChartAreaFunction · 0.90
ChartColumnSingleFunction · 0.90

Calls 2

useSettingsFunction · 0.90
baseCharOptionsFunction · 0.85

Tested by

no test coverage detected