Skip to content

Commit

Permalink
Added data binds for X & Y Labels
Browse files Browse the repository at this point in the history
  • Loading branch information
avdaredevil committed Feb 1, 2016
1 parent 2f876ae commit c4bc7ab
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions highcharts-chart.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
legend: {type: Boolean, value: false, reflectToAttribute:true},
chartOptions: {type: Object, value: ()=>{return {}}},
xAxis: {type: Object, value: ()=>{return {}}, observer: "_xAxisUpdate"},
xLabel: {type: String, value: "X-Axis"},
yLabel: {type: String, value: "Y-Axis"},
xLabel: {type: String, value: "X-Axis", observer: "_xAxisTitleUpdate"},
yLabel: {type: String, value: "Y-Axis", observer: "_yAxisTitleUpdate"},
label: {type: String, value: ""},
data: {type: Array, value: ()=>{return []}, observer:"setData"},
vsTime: {type: Boolean, value: false},
Expand Down Expand Up @@ -117,6 +117,8 @@
_updateType: function(t) {this.updateSeries("type",t)},
_checkSelected: function() {if(!this._chart){return};var points = this._chart.getSelectedPoints();this._setSelected(!!points.length);this._setSelectedPoints(points)},
_xAxisUpdate: function() {if(!this._chart){return};this._chart.xAxis[0].update(this.xAxis)},
_xAxisTitleUpdate: function() {if(!this._chart){return};this._chart.xAxis[0].update({title: {text: this.xLabel}})},
_yAxisTitleUpdate: function() {if(!this._chart){return};this._chart.yAxis[0].update({title: {text: this.yLabel}})},
_titleUpdate: function() {if(!this._chart){return};this._chart.setTitle({text: this.title})},
_loadingUpdate: function() {if(!this._chart){return};this._chart[(this.loading?"show":"hide")+"Loading"](this.loadingMessage)},
_subtitleUpdate: function() {if(!this._chart){return};this._chart.setTitle(null,{text: this.subtitle})},
Expand Down

0 comments on commit c4bc7ab

Please sign in to comment.