Skip to content

Commit cb33e50

Browse files
authored
Merge pull request #807 from neo4j-labs/revert-806-fix/radar_num_upgrade
Revert "Fix Radar number NaN High-Low"
2 parents be5111c + 8ba4094 commit cb33e50

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/chart/parameter/component/DateParameterSelect.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const DatePickerParameterSelectComponent = (props: ParameterSelectProps) => {
5555
setInputDate(newValue);
5656

5757
// Check whether the user has inputted a valid year. If not, do not update the parameter.
58-
if (!newValue || Number.isNaN(newValue.$y) || Number.isNaN(newValue.$m) || Number.isNaN(newValue.$d)) {
58+
if (!newValue || isNaN(newValue.$y) || isNaN(newValue.$m) || isNaN(newValue.$d)) {
5959
return;
6060
}
6161
if (newValue == null && clearParameterOnFieldClear) {

src/extensions/advancedcharts/chart/gauge/GaugeChart.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ const NeoGaugeChart = (props: ChartProps) => {
4242
const chartId = createUUID();
4343
let score = records && records[0] && records[0]._fields && records[0]._fields[0] ? records[0]._fields[0] : '';
4444

45-
if (Number.isNaN(score)) {
45+
if (isNaN(score)) {
4646
return <NoDrawableDataErrorMessage />;
4747
}
4848
if (score.low != undefined) {

src/extensions/advancedcharts/chart/radar/RadarChart.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ const NeoRadarChart = (props: ChartProps) => {
6767
const entry = {};
6868
selection.values.concat([selection.index]).forEach((k) => {
6969
const fieldIndex = r._fieldLookup[k];
70-
if (k !== selection.index && Number.isNaN(r._fields[fieldIndex])) {
70+
if (k !== selection.index && isNaN(r._fields[fieldIndex])) {
7171
valid = false;
7272
}
7373
entry[k] = `${r._fields[fieldIndex]}`;

src/extensions/advancedcharts/chart/sankey/SankeyChart.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ const NeoSankeyChart = (props: ChartProps) => {
8686
properties: value.properties,
8787
value: 1,
8888
});
89-
} else if (value.properties[labelProperty] !== undefined && !Number.isNaN(value.properties[labelProperty])) {
89+
} else if (value.properties[labelProperty] !== undefined && !isNaN(value.properties[labelProperty])) {
9090
addItem(links[`${value.start.low},${value.end.low}`], {
9191
id: value.identity.low,
9292
source: value.start.low,

0 commit comments

Comments
 (0)