mirror of
https://github.com/valitydev/redash.git
synced 2024-11-07 09:28:51 +00:00
Make the default newOptions apply to all but the chart vis
This commit is contained in:
parent
aabc912862
commit
9b7227a88b
@ -79,24 +79,22 @@
|
||||
'type': Visualization.prototype.TYPES.CHART,
|
||||
'name': '',
|
||||
'description': q.description || '',
|
||||
'options': newOptions()
|
||||
'options': newOptions(Visualization.prototype.TYPES.CHART)
|
||||
};
|
||||
}
|
||||
}, true);
|
||||
}
|
||||
|
||||
function newOptions(chartType) {
|
||||
if (chartType === Visualization.prototype.TYPES.COHORT) {
|
||||
// empty config at the moment
|
||||
return {};
|
||||
if (chartType === Visualization.prototype.TYPES.CHART) {
|
||||
return {
|
||||
'series': {
|
||||
'type': 'column'
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// Chart
|
||||
return {
|
||||
'series': {
|
||||
'type': scope.seriesTypes[0]
|
||||
}
|
||||
};
|
||||
return {};
|
||||
}
|
||||
|
||||
scope.$watch('vis.type', function(type) {
|
||||
|
Loading…
Reference in New Issue
Block a user