Add "Missing and NULL values" option to scatter chart (#7523)

This commit is contained in:
Tsuneo Yoshioka
2025-09-09 08:54:11 +09:00
committed by GitHub
parent ac81f0b223
commit 120250152f
2 changed files with 5 additions and 2 deletions

View File

@@ -336,7 +336,7 @@ export default function GeneralSettings({ options, data, onOptionsChange }: any)
</Section> </Section>
)} )}
{!includes(["custom", "heatmap", "bubble", "scatter"], options.globalSeriesType) && ( {!includes(["custom", "heatmap", "bubble"], options.globalSeriesType) && (
// @ts-expect-error ts-migrate(2745) FIXME: This JSX tag's 'children' prop expects type 'never... Remove this comment to see the full error message // @ts-expect-error ts-migrate(2745) FIXME: This JSX tag's 'children' prop expects type 'never... Remove this comment to see the full error message
<Section> <Section>
<Select <Select

View File

@@ -96,7 +96,10 @@ function prepareSeries(series: any, options: any, numSeries: any, additionalOpti
// For bubble/scatter charts `y` may be any (similar to `x`) - numeric is only bubble size; // For bubble/scatter charts `y` may be any (similar to `x`) - numeric is only bubble size;
// for other types `y` is always number // for other types `y` is always number
const cleanYValue = includes(["bubble", "scatter"], seriesOptions.type) const cleanYValue = includes(["bubble", "scatter"], seriesOptions.type)
? normalizeValue ? (v: any, axixType: any) => {
v = normalizeValue(v, axixType);
return includes(["scatter"], seriesOptions.type) && options.missingValuesAsZero && isNil(v) ? 0.0 : v;
}
: (v: any) => { : (v: any) => {
v = cleanNumber(v); v = cleanNumber(v);
return options.missingValuesAsZero && isNil(v) ? 0.0 : v; return options.missingValuesAsZero && isNil(v) ? 0.0 : v;