diff --git a/packages/client/manifest.json b/packages/client/manifest.json index 12d52a2547..779142abb0 100644 --- a/packages/client/manifest.json +++ b/packages/client/manifest.json @@ -1685,7 +1685,7 @@ { "type": "select", "label": "Format", - "key": "valueUnits", + "key": "yAxisUnits", "options": ["Default", "Thousands", "Millions"], "defaultValue": "Default" }, @@ -1854,7 +1854,7 @@ { "type": "select", "label": "Format", - "key": "valueUnits", + "key": "yAxisUnits", "options": ["Default", "Thousands", "Millions"], "defaultValue": "Default" }, @@ -2018,7 +2018,7 @@ { "type": "select", "label": "Format", - "key": "valueUnits", + "key": "yAxisUnits", "options": ["Default", "Thousands", "Millions"], "defaultValue": "Default" }, @@ -2510,7 +2510,7 @@ { "type": "select", "label": "Format", - "key": "valueUnits", + "key": "yAxisUnits", "options": ["Default", "Thousands", "Millions"], "defaultValue": "Default" }, @@ -5476,7 +5476,7 @@ { "type": "select", "label": "Format", - "key": "valueUnits", + "key": "yAxisUnits", "options": ["Default", "Thousands", "Millions"], "defaultValue": "Default" }, @@ -5586,7 +5586,7 @@ { "type": "select", "label": "Format", - "key": "valueUnits", + "key": "yAxisUnits", "options": ["Default", "Thousands", "Millions"], "defaultValue": "Default" }, @@ -5645,7 +5645,7 @@ { "type": "select", "label": "Format", - "key": "valueUnits", + "key": "yAxisUnits", "options": ["Default", "Thousands", "Millions"], "defaultValue": "Default" }, @@ -5752,7 +5752,7 @@ { "type": "select", "label": "Format", - "key": "valueUnits", + "key": "yAxisUnits", "options": ["Default", "Thousands", "Millions"], "defaultValue": "Default" }, diff --git a/packages/client/package.json b/packages/client/package.json index d8b2fa9447..ca60e82da5 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -40,7 +40,6 @@ "sanitize-html": "^2.7.0", "screenfull": "^6.0.1", "shortid": "^2.2.15", - "svelte-apexcharts": "^1.0.2", "svelte-flatpickr": "^3.3.4", "svelte-spa-router": "^4.0.1" }, diff --git a/packages/client/src/components/app/charts/AreaChart.svelte b/packages/client/src/components/app/charts/AreaChart.svelte index 0db493565c..a9a61e59f6 100644 --- a/packages/client/src/components/app/charts/AreaChart.svelte +++ b/packages/client/src/components/app/charts/AreaChart.svelte @@ -14,7 +14,7 @@ export let dataLabels export let curve export let legend - export let valueUnits + export let yAxisUnits export let palette export let c1, c2, c3, c4, c5 @@ -30,8 +30,8 @@ dataProvider?.schema?.[labelColumn]?.type === "datetime" ? "datetime" : "category" - $: xAxisFormatter = getFormatter(labelType, valueUnits, "x") - $: yAxisFormatter = getFormatter(labelType, valueUnits, "y") + $: xAxisFormatter = getFormatter(labelType, yAxisUnits, "x") + $: yAxisFormatter = getFormatter(labelType, yAxisUnits, "y") $: fill = getFill(gradient) $: options = { @@ -125,7 +125,7 @@ }) } - const getFormatter = (labelType, valueUnits, axis) => { + const getFormatter = (labelType, yAxisUnits, axis) => { const isLabelAxis = axis === "x" if (labelType === "datetime" && isLabelAxis) { @@ -136,7 +136,7 @@ return formatters["Default"] } - return formatters[valueUnits] + return formatters[yAxisUnits] } const getFill = gradient => { diff --git a/packages/client/src/components/app/charts/BarChart.svelte b/packages/client/src/components/app/charts/BarChart.svelte index 127cb98e23..aeebfe9461 100644 --- a/packages/client/src/components/app/charts/BarChart.svelte +++ b/packages/client/src/components/app/charts/BarChart.svelte @@ -15,7 +15,7 @@ export let animate export let legend export let stacked - export let valueUnits + export let yAxisUnits export let palette export let c1, c2, c3, c4, c5 export let horizontal @@ -27,8 +27,8 @@ dataProvider?.schema?.[labelColumn]?.type === "datetime" ? "datetime" : "category" - $: xAxisFormatter = getFormatter(labelType, valueUnits, horizontal, "x") - $: yAxisFormatter = getFormatter(labelType, valueUnits, horizontal, "y") + $: xAxisFormatter = getFormatter(labelType, yAxisUnits, horizontal, "x") + $: yAxisFormatter = getFormatter(labelType, yAxisUnits, horizontal, "y") $: options = { series, @@ -124,7 +124,7 @@ }) } - const getFormatter = (labelType, valueUnits, horizontal, axis) => { + const getFormatter = (labelType, yAxisUnits, horizontal, axis) => { const isLabelAxis = (axis === "y" && horizontal) || (axis === "x" && !horizontal) if (labelType === "datetime" && isLabelAxis) { @@ -135,7 +135,7 @@ return formatters["Default"] } - return formatters[valueUnits] + return formatters[yAxisUnits] } diff --git a/packages/client/src/components/app/charts/CandleStickChart.svelte b/packages/client/src/components/app/charts/CandleStickChart.svelte index 8ddb4d4047..61cdef180b 100644 --- a/packages/client/src/components/app/charts/CandleStickChart.svelte +++ b/packages/client/src/components/app/charts/CandleStickChart.svelte @@ -14,7 +14,7 @@ export let height export let width export let animate - export let valueUnits + export let yAxisUnits $: series = getSeries( dataProvider, @@ -55,7 +55,7 @@ }, yaxis: { labels: { - formatter: formatters[valueUnits], + formatter: formatters[yAxisUnits], }, title: { text: yAxisLabel, diff --git a/packages/client/src/components/app/charts/LineChart.svelte b/packages/client/src/components/app/charts/LineChart.svelte index 445695cd35..c2dac189e1 100644 --- a/packages/client/src/components/app/charts/LineChart.svelte +++ b/packages/client/src/components/app/charts/LineChart.svelte @@ -14,7 +14,7 @@ export let dataLabels export let curve export let legend - export let valueUnits + export let yAxisUnits export let palette export let c1, c2, c3, c4, c5 @@ -25,8 +25,8 @@ dataProvider?.schema?.[labelColumn]?.type === "datetime" ? "datetime" : "category" - $: xAxisFormatter = getFormatter(labelType, valueUnits, "x") - $: yAxisFormatter = getFormatter(labelType, valueUnits, "y") + $: xAxisFormatter = getFormatter(labelType, yAxisUnits, "x") + $: yAxisFormatter = getFormatter(labelType, yAxisUnits, "y") $: options = { series, @@ -117,7 +117,7 @@ }) } - const getFormatter = (labelType, valueUnits, axis) => { + const getFormatter = (labelType, yAxisUnits, axis) => { const isLabelAxis = axis === "x" if (labelType === "datetime" && isLabelAxis) { @@ -128,7 +128,7 @@ return formatters["Default"] } - return formatters[valueUnits] + return formatters[yAxisUnits] } diff --git a/packages/client/src/components/app/charts/utils.js b/packages/client/src/components/app/charts/utils.js index a2ecc14819..7f280ce852 100644 --- a/packages/client/src/components/app/charts/utils.js +++ b/packages/client/src/components/app/charts/utils.js @@ -13,7 +13,7 @@ export const parsePalette = (paletteName) => { const [_, number] = paletteName.split(" "); - return `pallete${number}` + return `palette${number}` } // Deep clone which copies function references