SYNC: chart labels for pie chart

This commit is contained in:
SPRINX0\prochazka
2025-06-09 10:15:23 +02:00
committed by Diflow
parent 171d58658a
commit e77b83bd92
4 changed files with 9 additions and 1 deletions

View File

@@ -49,6 +49,8 @@ export interface ChartDefinition {
xdef: ChartXFieldDefinition; xdef: ChartXFieldDefinition;
ydefs: ChartYFieldDefinition[]; ydefs: ChartYFieldDefinition[];
useDataLabels?: boolean;
} }
export interface ChartDateParsed { export interface ChartDateParsed {

View File

@@ -637,7 +637,7 @@ export function parseNumberSafe(value) {
return parseFloat(value); return parseFloat(value);
} }
const frontMatterRe = /^--\ >>>[ \t]*\n(.*)\n-- <<<[ \t]*\n/s; const frontMatterRe = /^--\ >>>[ \t\r]*\n(.*)\n-- <<<[ \t\r]*\n/s;
export function getSqlFrontMatter(text: string, yamlModule) { export function getSqlFrontMatter(text: string, yamlModule) {
const match = text.match(frontMatterRe); const match = text.match(frontMatterRe);

View File

@@ -24,6 +24,7 @@
"ace-builds": "^1.36.5", "ace-builds": "^1.36.5",
"chart.js": "^4.4.2", "chart.js": "^4.4.2",
"chartjs-adapter-moment": "^1.0.0", "chartjs-adapter-moment": "^1.0.0",
"chartjs-plugin-datalabels": "^2.2.0",
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"dbgate-datalib": "^6.0.0-alpha.1", "dbgate-datalib": "^6.0.0-alpha.1",
"dbgate-query-splitter": "^4.11.5", "dbgate-query-splitter": "^4.11.5",

View File

@@ -3796,6 +3796,11 @@ chartjs-adapter-moment@^1.0.0:
resolved "https://registry.yarnpkg.com/chartjs-adapter-moment/-/chartjs-adapter-moment-1.0.1.tgz#0f04c30d330b207c14bfb57dfaae9ce332f09102" resolved "https://registry.yarnpkg.com/chartjs-adapter-moment/-/chartjs-adapter-moment-1.0.1.tgz#0f04c30d330b207c14bfb57dfaae9ce332f09102"
integrity sha512-Uz+nTX/GxocuqXpGylxK19YG4R3OSVf8326D+HwSTsNw1LgzyIGRo+Qujwro1wy6X+soNSnfj5t2vZ+r6EaDmA== integrity sha512-Uz+nTX/GxocuqXpGylxK19YG4R3OSVf8326D+HwSTsNw1LgzyIGRo+Qujwro1wy6X+soNSnfj5t2vZ+r6EaDmA==
chartjs-plugin-datalabels@^2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/chartjs-plugin-datalabels/-/chartjs-plugin-datalabels-2.2.0.tgz#369578e131d743c2e34b5fbe2d3f9335f6639b8f"
integrity sha512-14ZU30lH7n89oq+A4bWaJPnAG8a7ZTk7dKf48YAzMvJjQtjrgg5Dpk9f+LbjCF6bpx3RAGTeL13IXpKQYyRvlw==
chartjs-plugin-zoom@^1.2.0: chartjs-plugin-zoom@^1.2.0:
version "1.3.0" version "1.3.0"
resolved "https://registry.yarnpkg.com/chartjs-plugin-zoom/-/chartjs-plugin-zoom-1.3.0.tgz#3dc525a59e9ca34c5823ba543b32218ccefabac9" resolved "https://registry.yarnpkg.com/chartjs-plugin-zoom/-/chartjs-plugin-zoom-1.3.0.tgz#3dc525a59e9ca34c5823ba543b32218ccefabac9"