Addepar / ember-charts

Home Page:https://opensource.addepar.com/ember-charts/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Certain inputs can cause browser to hang

raytiley opened this issue · comments

I want to dig into this more to see if I can figure out what's happening, but wanted to post incase someone knows exactly what is causing this, and how to fix it. I had some user data that caused a page using the vertical-bar-chart to hang the browser. Debugging it seems like its getting stuck trying to calculate how much the label should be rotated. I ended up fixing, temporarily, but adjusting the maxLabelHeight. It seems like it would be good to bail out of the rotation after N attempts, and or allow for forcing the degree of rotation.

The input that causes the hang is provided below. I was using ember-charts#master installed yesterday.

[
  {
    "label": "Brethren Voices  -  Survival In The Arctic National Wildlife Refuge",
    "value": 5
  },
  {
    "label": "Brethren Voices - A Congressional Press Secretary - Jerry ODonnell",
    "value": 3
  },
  {
    "label": "Brethren Voices - The Gift Of Giving To Nurture Community",
    "value": 2
  },
  {
    "label": "Brethren Voices - Volunteer Service",
    "value": 2
  }
]