mirror of
https://github.com/getredash/redash.git
synced 2025-12-19 17:37:19 -05:00
Add "Missing and NULL values" option to scatter chart (#7523)
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user