mirror of
https://github.com/getredash/redash.git
synced 2025-12-25 01:03:20 -05:00
Add an option to disable chart legend.
A user can disable it if he has tons of series. Now that we explicitly enable it, it's also visible for a single series.
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
var defaultOptions = {
|
||||
globalSeriesType: 'column',
|
||||
sortX: true,
|
||||
legend: {enabled: true},
|
||||
yAxis: [{type: 'linear'}, {type: 'linear', opposite: true}],
|
||||
xAxis: {type: 'datetime', labels: {enabled: true}},
|
||||
series: {stacking: null},
|
||||
@@ -180,6 +181,10 @@
|
||||
}
|
||||
});
|
||||
|
||||
if (!_.has(scope.options, 'legend')) {
|
||||
scope.options.legend = {enabled: true};
|
||||
}
|
||||
|
||||
if (scope.columnNames)
|
||||
_.each(scope.options.columnMapping, function(value, key) {
|
||||
if (scope.columnNames.length > 0 && !_.contains(scope.columnNames, key))
|
||||
|
||||
Reference in New Issue
Block a user