Skip to content
This repository has been archived by the owner on Jan 16, 2018. It is now read-only.

Changing column data leads to js error #159

Open
bryceosterhaus opened this issue Nov 20, 2017 · 0 comments
Open

Changing column data leads to js error #159

bryceosterhaus opened this issue Nov 20, 2017 · 0 comments

Comments

@bryceosterhaus
Copy link
Contributor

Currently using jsx to render a pie chart. When I change the data passed into the columns prop, I get a js error in the console.

billboard.js:9310 Uncaught TypeError: Cannot convert undefined or null to object
at Function.keys ()
at Chart.load (billboard.js:9310)
at PieChart.handleColumnsChanged_ (ChartBase.js:360)
at PieChart.runListeners_ (EventEmitter.js:463)
at PieChart.emit (EventEmitter.js:189)

I think this stems from not having a default value for the colors arg on data items

Two data sets I am switching between.

[
	{
		data: [230, 190, 300, 500, 300, 400],
		id: 'data1',
	},
	{
		data: [50, 20, 10, 40, 15, 25],
		id: 'data2'
	}
]


[
	{
		data: [10],
		id: 'data3',
	},
	{
		data: [20],
		id: 'data4'
	}
]
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant