pepstock-org / Charba

J2CL and GWT Charts library based on CHART.JS
https://pepstock-org.github.io/Charba-Wiki/docs
Apache License 2.0
62 stars 6 forks source link

Plugin without initial configuration cannot be changed at runtime #70

Closed stockiNail closed 2 years ago

stockiNail commented 2 years ago

When you set an inner plugin, provided out of the box from Charba (for instance ColorSchemes) to a chart without the initial configuration (because you want to use the defaults) and you want to change the plugin behavior setting the configuration at runtime, you get the following javascript error (see showcase of Colorschemes on bubble chart):

Throwable.java:117 Uncaught Error: com.google.gwt.event.shared.UmbrellaException: Exception caught: (TypeError) : t is not iterable
    at ujc_g$.Dz_g$ [as createError_0_g$] (Throwable.java:117:1)
    at ujc_g$.Oz_g$ [as initializeBackingError_0_g$] (Throwable.java:109:1)
    at ujc_g$.xz_g$ (Throwable.java:76:1)
    at ujc_g$.eA_g$ (Exception.java:33:1)
    at ujc_g$.mA_g$ (RuntimeException.java:33:1)
    at ujc_g$.njc_g$ (UmbrellaException.java:65:1)
    at new ujc_g$ (UmbrellaException.java:26:1)
    at oic_g$.ric_g$ [as fireEvent_1_g$] (HandlerManager.java:129:1)
    at m6c_g$.N2c_g$ [as fireEvent_1_g$] (Widget.java:129:1)
    at s7b_g$ (DomEvent.java:125:1)
    at m6c_g$.V2c_g$ [as onBrowserEvent_0_g$] (Widget.java:177:1)
    at lWc_g$ (DOM.java:1481:1)
    at kWc_g$ (DOM.java:1420:1)
    at HTMLInputElement.y0c_g$ (DOMImplStandard.java:317:1)
    at xI_g$ (Impl.java:309:1)
    at AI_g$ (Impl.java:368:1)
    at HTMLInputElement.<anonymous> (Impl.java:78:1)

This is happening due to the proxy management of the CHART.JS options.