Improved chart names for chart type dropdown. (#7631)

* isolated problem involving user friendly names

* Fix to handle horizontalBar

* Working rough version, need to implement data structure to store alternative names later

* consolidated checks into its own static method, data structure still highly recommended to implement

* Version with hashMap implemented
This commit is contained in:
Alex Ma
2019-10-10 11:08:33 -07:00
committed by GitHub
parent 543e3e2c09
commit 4d618c5ef1
2 changed files with 32 additions and 1 deletions

View File

@@ -49,6 +49,7 @@ export class ChartView extends Disposable implements IPanelView {
type: ChartType.Bar
};
/** parent container */
private container: HTMLElement;
/** container for the options controls */
@@ -276,6 +277,7 @@ export class ChartView extends Disposable implements IPanelView {
};
break;
case ControlType.combo:
let dropdown = new SelectBox(option.displayableOptions || option.options, undefined, this._contextViewService);
dropdown.select(option.options.indexOf(value));
dropdown.render(optionContainer);