Skip to content
Snippets Groups Projects
Commit ac26e199 authored by Sameer Al-Sakran's avatar Sameer Al-Sakran
Browse files

appease the pedants

parent faa4dd5f
Branches
Tags
No related merge requests found
......@@ -76,13 +76,14 @@ class ChartSettings extends Component {
}
getChartTypeName(){
if (this.props.series[0].card.display === "table") {
return "table";
} else if (this.props.series[0].card.display === "scalar"){
return "number";
} else {
return "chart";
}
switch(this.props.series[0].card.display){
case "table":
return "table";
case "scalar":
return "number";
default:
return "chart";
}
}
......@@ -99,12 +100,11 @@ class ChartSettings extends Component {
const tabNames = Object.keys(tabs);
const currentTab = this.state.currentTab || tabNames[0];
const widgets = tabs[currentTab];
const chartTypeName = this.getChartTypeName();
const isDirty = !_.isEqual(this.props.series[0].card.visualization_settings, this.state.settings);
return (
<div className="flex flex-column spread p4">
<h2 className="my2">Customize this {chartTypeName}</h2>
<h2 className="my2">Customize this {this.getChartTypeName()}</h2>
{ tabNames.length > 1 &&
<ChartSettingsTabs tabs={tabNames} selectTab={this.selectTab} activeTab={currentTab}/>
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment