@lightdash/common 0.1378.4 → 0.1379.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -62,6 +62,10 @@ export type ApiMetricsCatalog = {
62
62
  status: 'ok';
63
63
  results: KnexPaginatedData<ApiMetricsCatalogResults>;
64
64
  };
65
+ export type ApiGetMetric = {
66
+ status: 'ok';
67
+ results: CompiledMetric;
68
+ };
65
69
  export type CatalogMetadata = {
66
70
  name: string;
67
71
  description: string | undefined;
@@ -90,9 +90,9 @@ class CartesianChartDataModel {
90
90
  [field_1.DimensionType.DATE, field_1.DimensionType.TIMESTAMP].includes(column.dimensionType));
91
91
  const numericColumns = [...dimensions, ...metrics].filter((column) => 'dimensionType' in column &&
92
92
  column.dimensionType === field_1.DimensionType.NUMBER);
93
- const xColumn = categoricalColumns[0] ||
93
+ const xColumn = dateColumns[0] ||
94
+ categoricalColumns[0] ||
94
95
  booleanColumns[0] ||
95
- dateColumns[0] ||
96
96
  numericColumns[0] ||
97
97
  dimensions[0];
98
98
  if (xColumn === undefined) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lightdash/common",
3
- "version": "0.1378.4",
3
+ "version": "0.1379.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [