ladybug-tools / ladybug-legacy

:beetle: Ladybug is an environmental plugin for Grasshopper.
http://ladybug.tools
Other
192 stars 82 forks source link

Ladybug line chart type 2 #454

Closed sawjam closed 5 years ago

sawjam commented 5 years ago

errordatafile.txt When using the attached data the chart fails with: Runtime error (TypeErrorException): iteration over non-sequence of type NoneType

Traceback: line 427, in plotData, "" line 506, in script Chart 0 and chart 1 work fine.

sawjam commented 5 years ago

sorry closed it accidentally

chriswmackey commented 5 years ago

@sawjam , All of the data is displaying correctly after I imported and reformatted it: image

Could you post a link to a file that recreates the issue?

sawjam commented 5 years ago

Hi Chris, the data failed when type 2 is selected on the chart Type. image

chriswmackey commented 5 years ago

@sawjam ,

The issue was that one of your lists was entirely of 0 values, which make it difficult to draw an area chart since there is no area under the curve. While I had a check for this when you plugged in only a single list of 0 values, I didn't have checks for when this type of data is alongside other data lists. So I added a check here: https://github.com/mostaphaRoudsari/ladybug/commit/f34254bd855e7b64d5d47d4995a3c1551f6c32e0 Ans, while you still won't get a mesh for this list of all 0 values, the component will still run for the other lists.