Skip to content
Snippets Groups Projects
Commit 2044958e authored by Tom Robinson's avatar Tom Robinson
Browse files

Update line/area/bar chart error message

parent c8f5107a
No related branches found
No related tags found
No related merge requests found
......@@ -6,4 +6,5 @@ export default class AreaChart extends LineAreaBarChart {
static displayName = "Area";
static identifier = "area";
static iconName = "area";
static noun = "area chart";
}
......@@ -6,4 +6,5 @@ export default class BarChart extends LineAreaBarChart {
static displayName = "Bar";
static identifier = "bar";
static iconName = "bar";
static noun = "bar chart";
}
......@@ -6,4 +6,5 @@ export default class LineChart extends LineAreaBarChart {
static displayName = "Line";
static identifier = "line";
static iconName = "line";
static noun = "line chart";
}
......@@ -10,7 +10,7 @@ import { isNumeric, isDate, isDimension, isString } from "metabase/lib/schema_me
import { isSameSeries } from "metabase/visualizations/lib/utils";
import Urls from "metabase/lib/urls";
import { MinColumnsError, MinRowsError } from "metabase/visualizations/lib/errors";
import { MinRowsError } from "metabase/visualizations/lib/errors";
import crossfilter from "crossfilter";
import _ from "underscore";
......@@ -56,7 +56,7 @@ export default class LineAreaBarChart extends Component {
static checkRenderable(cols, rows) {
if (rows.length < 1) { throw new MinRowsError(1, rows.length); }
if (!(isDimensionMetric(cols, false) || isDimensionDimensionMetric(cols) || isDimensionMetricMetric(cols))) {
throw new Error("This visualization requires one dimension followed by one or more metrics, or two dimensions followed by one metric.");
throw new Error("We couldn’t create a " + this.noun + " based on your query.");
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment