Giter Club home page Giter Club logo

Comments (7)

Ovilia avatar Ovilia commented on April 27, 2024

什么 template?

from echarts-for-weixin.

kiccer avatar kiccer commented on April 27, 2024

https://mp.weixin.qq.com/debug/wxadoc/dev/framework/view/wxml/template.html

from echarts-for-weixin.

Ovilia avatar Ovilia commented on April 27, 2024

我没有试过,直接用有什么问题吗?

from echarts-for-weixin.

kiccer avatar kiccer commented on April 27, 2024

直接用应该是可以的,但是我做的公司项目中,页面中内容太多了,就拆成了多个模块

from echarts-for-weixin.

Ovilia avatar Ovilia commented on April 27, 2024

理论上不需要用到模板,因为这个项目把 ECharts 图表封装成组件了。模板是小程序在支持自定义组件之前的解决方案,现在推荐用自定义组件搞

from echarts-for-weixin.

kiccer avatar kiccer commented on April 27, 2024

还有一个疑问就是,
data: { ec: { onInit: initChart } }
这样写,是不是说一个页面中,就只能有一个图表?不能有多个图表?

from echarts-for-weixin.

Ovilia avatar Ovilia commented on April 27, 2024

可以有多个图表的:

<ec-canvas id="mychart-dom-bar-1" canvas-id="mychart-bar-1" ec="{{ ec1 }}"></ec-canvas>
<ec-canvas id="mychart-dom-bar-2" canvas-id="mychart-bar-2" ec="{{ ec2 }}"></ec-canvas>
data: {
    ec1: {
      onInit: initChart1
    }, 
    ec2: {
      onInit: initChart2
    }
  }

这样就行了。

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.