Skip to content

Commit

Permalink
Initialize chart to null inside 'render()'
Browse files Browse the repository at this point in the history
* Fixes ZEPPELIN-2253
* When pie chart's key(domain) is changed, this error is logged:
 'Uncaught TypeError: arcs[idx] is not a function at pie.js:358'
* Even if we change key and values, chart remains broken

* Fix: set this.chart to null, which inturn makes this.render to
intialize a new chart constructor
  • Loading branch information
sravan-s committed Mar 14, 2017
1 parent f0cf85f commit 310aecf
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ export default class PiechartVisualization extends Nvd3ChartVisualization {
};

render(pivot) {
// [ZEPPELIN-2253] New chart function will be created each time inside super.render()
this.chart = null;
var d3Data = this.d3DataFromPivot(
pivot.schema,
pivot.rows,
Expand Down

0 comments on commit 310aecf

Please sign in to comment.