vaadin/vaadin-charts

Error in console when using 6.1-alpha1

Closed this issue · 2 comments

Peppe commented

After updating to Charts 6.1-alpha1 I have started to get these errors to my console. They don't affect the outcome. The more charts I get, the more of these I see. In my view right now I get 330 of these errors.

Error: <rect> attribute width: Unexpected end of attribute. Expected length, "".
  | (anonymous) | @ | highstock.js:17
-- | -- | -- | --
  | a.objectEach | @ | highstock.js:27
  | a.attr | @ | highstock.js:17
  | strokeWidth | @ | highstock.js:47
  | render | @ | highstock.js:212
  | init | @ | highstock.js:202
  | a.Legend | @ | highstock.js:202
  | render | @ | highstock.js:239

I'm sorry. We can't fix this for now. Apparently using the property based API this should not be an issue. Accessing JSON/JS API causes an issue with this. @oluwasayo can comment more about the cause.

Context: this issue was opened after updating a React application to vaadin-charts:6.1-alpha1

vaadin-chart is meant to be configured before next render (request animation frame) as stated in the docs and shown in demos (see Configuring your chart using JS API). vaadin-chart also uses this approach internally.

However due to specifics of how React handles virtual DOM and real DOM updates, we cannot easily determine if we are performing configuration and measurements at the right time.