Closed andfanilo closed 3 years ago
yes, you are right, the global variable echarts
does not exist anymore after webpacking, so the LinearGradient
will not work with the built chunks.
variable echarts
has lots of APIs that can be set to chart option in runtime. In webpack environment, you can only use them when developing , e.g. echarts.registerMap
, in build chunks it does not exist either.
Yeah, which is too bad :(
I wanted to try referring back to the echarts instance through a ref but the Streamlit lifecycle makes it hard to go back and forth between Python and JS afterwards anyway _(absolutely not easy to do streamlit_echarts.setOption or streamlitecharts.registerMap after the component was set, everything must be done when initializing the component and then eventually rerunning the script by changing component arguments to animate between 2 states)
Thanks for your comment, it helped reinforce my thoughts about it :) I may close this soon as "Unresolved"
Fanilo
Actually I'll close this in favor of #4
doesn't work. I suppose the
echarts
namespace was minified and doesn't exist anymore?https://echarts.apache.org/examples/en/editor.html?c=bar-gradient