Fixed datetime bug
This commit is contained in:
Родитель
53ea77a311
Коммит
342cc5525c
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "adx-query-charts",
|
||||
"version": "1.1.1",
|
||||
"version": "1.1.2",
|
||||
"description": "Draw charts from Azure Data Explorer queries",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
|
|
|
@ -74,12 +74,10 @@ export class _LimitVisResults {
|
|||
this.limitAllRows(internalParams, limitedResults);
|
||||
this.aggregateAndEscapeRows(internalParams, limitedResults);
|
||||
|
||||
const xIndex = params.axesIndexes.xAxis;
|
||||
|
||||
// Sort the x-Axis only if it's a date time column
|
||||
if (params.xColumnType === DraftColumnType.DateTime) {
|
||||
// Remove empty date values since they can't be placed on the x-axis timeline, then sort by the date
|
||||
limitedResults.rows = _.sortBy(limitedResults.rows.filter(row => row[xIndex] != null), (row) => {
|
||||
limitedResults.rows = _.sortBy(limitedResults.rows.filter(row => row[0] != null), (row) => {
|
||||
return moment(row[0]).valueOf();
|
||||
});
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче