Giter Club home page Giter Club logo

Comments (11)

Ben-zjq avatar Ben-zjq commented on April 27, 2024 5

暂时用 通过用hidden取代了wx:if解决了我目前的需求
直接给图表加hidden无效 使用display:hidden也无效
使用的方法是给图表外加一层view 然后控制这层view的hidden属性 来解决的
qq 20180309152945
@Ovilia 感谢你对我提问的关注

from echarts-for-weixin.

Ben-zjq avatar Ben-zjq commented on April 27, 2024

追加补充 button2 只是隐藏了view 没有用dispose释放chart
qq 20180308154657
@Ovilia

from echarts-for-weixin.

Ben-zjq avatar Ben-zjq commented on April 27, 2024

这个问题 我在网上搜索到一个网页版的相似问题 但是我不知道在微信小程序中应该如何解决https://www.cnblogs.com/daijinxue/p/6903539.html

from echarts-for-weixin.

Ovilia avatar Ovilia commented on April 27, 2024

后面我看看组件能不能更好地支持一下。不用客气,应该的~

from echarts-for-weixin.

tongxin2013 avatar tongxin2013 commented on April 27, 2024

@Ben-zjq 像你说的一样
设置外层View标签的hidden属性,hidden属性值类型为boolean
example:
<view class="date-chart" hidden="{{resHidden}}">
<ec-canvas id="mychart-dom-pie" canvas-id="mychart-pie" ec="{{ ec }}"></ec-canvas>
</view>

from echarts-for-weixin.

cjackeroo avatar cjackeroo commented on April 27, 2024

@Ben-zjq
解决了我一个大问题。

echart在微信下的展示,踩了两天坑了

from echarts-for-weixin.

kubixiaoguo avatar kubixiaoguo commented on April 27, 2024

但是hidden我遇到一个新bug,就是初始echarts用hidden隐藏的话,再显示出来的话,echarts画的图表位置会偏离到canvas最边上去。。。

from echarts-for-weixin.

llaiwenbin avatar llaiwenbin commented on April 27, 2024

但是hidden我遇到一个新bug,就是初始echarts用hidden隐藏的话,再显示出来的话,echarts画的图表位置会偏离到canvas最边上去。。。

解决了吗我也遇到这样的问题

from echarts-for-weixin.

Guotykaka avatar Guotykaka commented on April 27, 2024

但是hidden我遇到一个新bug,就是初始echarts用hidden隐藏的话,再显示出来的话,echarts画的图表位置会偏离到canvas最边上去。。。

解决了吗我也遇到这样的问题

找到解决办法了吗兄弟

from echarts-for-weixin.

kcjian avatar kcjian commented on April 27, 2024

我初始化hidden=true,一顿操作之后hidden=false,调this.ecComponent.init,使用的懒加载,图表一片空白,怎么都调不出来,有谁能知道是为啥吗

from echarts-for-weixin.

Ovilia avatar Ovilia commented on April 27, 2024

首先检查一下调用 init 的时候,容器节点是否有宽度和高度,没有的话是否需要在 setTimeout 里初始化

from echarts-for-weixin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.