diff --git a/public/app/plugins/datasource/testdata/testData/serviceMapResponse.ts b/public/app/plugins/datasource/testdata/testData/serviceMapResponse.ts index dedde9de77e..7f4d7357133 100644 --- a/public/app/plugins/datasource/testdata/testData/serviceMapResponse.ts +++ b/public/app/plugins/datasource/testdata/testData/serviceMapResponse.ts @@ -172,7 +172,7 @@ export const nodes = { { name: NodeGraphDataFrameFieldNames.arc + 'faults', type: FieldType.number, - config: { color: { mode: FieldColorModeId.Fixed, fixedColor: 'red' }, displayName: 'faults' }, + config: { color: { mode: FieldColorModeId.Fixed, fixedColor: 'red' }, displayName: 'Faults' }, values: [ 0, 0, diff --git a/public/app/plugins/panel/nodeGraph/Legend.tsx b/public/app/plugins/panel/nodeGraph/Legend.tsx index 0294e8d141f..fa2c9126612 100644 --- a/public/app/plugins/panel/nodeGraph/Legend.tsx +++ b/public/app/plugins/panel/nodeGraph/Legend.tsx @@ -38,7 +38,7 @@ export const Legend = function Legend(props: Props) { (item) => { onSort({ field: item.data!.field, - ascending: item.data!.field === sort?.field ? !sort?.ascending : true, + ascending: item.data!.field === sort?.field ? !sort?.ascending : false, }); }, [sort, onSort] @@ -55,7 +55,7 @@ export const Legend = function Legend(props: Props) { <> {sortable && - (sort?.field === item.data!.field ? : '')} + (sort?.field === item.data!.field ? : '')} ); }} diff --git a/public/app/plugins/panel/nodeGraph/layout.ts b/public/app/plugins/panel/nodeGraph/layout.ts index a7d52f8bf5b..6087c04f6f2 100644 --- a/public/app/plugins/panel/nodeGraph/layout.ts +++ b/public/app/plugins/panel/nodeGraph/layout.ts @@ -179,8 +179,8 @@ function gridLayout( const val1 = sort!.field.values.get(node1.dataFrameRowIndex); const val2 = sort!.field.values.get(node2.dataFrameRowIndex); - // Lets pretend we don't care about type for a while - return sort!.ascending ? val2 - val1 : val1 - val2; + // Lets pretend we don't care about type of the stats for a while (they can be strings) + return sort!.ascending ? val1 - val2 : val2 - val1; }); }