Giter VIP home page Giter VIP logo

Comments (6)

kiccer avatar kiccer commented on May 5, 2024 1

顺便还有一个问题,怎样动态修改图表内的数据?在函数外怎么拿到chart实例

from echarts-for-weixin.

Ovilia avatar Ovilia commented on May 5, 2024

具体是什么错?精简一下代码,方便定位

from echarts-for-weixin.

kiccer avatar kiccer commented on May 5, 2024

报了很多错,能帮忙看一下这个哪里有错吗?

var option = {
    title: {
    },
    // tooltip: {
    // },
    legend: {
    },
    grid: {
      left: 48,
      right: 10,
      top: 30,
      bottom: 48
    },
    xAxis: {
      data: [],
      axisLine: {
        lineStyle: {
          color: '#fff'
        }
      },
      axisTick: {
        show: false,
        alignWithLabel: true
      },
      axisPointer: {
        show: true,
        label: {
          show: false,
          backgroundColor: '#3C414F'
        }
      },
      axisLabel: {
        formatter: (n, i) => {
          if (/^\d{4}-\d{2}-\d{2} \d{2}$/g.test(n)) {
            // 2017-12-27 15
            return n.replace(/\d{4}-(\d{2}-\d{2} \d{2})/g, '$1')
          } else if (/^\d{4}-\d{2}-\d{2}$/g.test(n)) {
            // 2017-12-27
            return n.replace(/\d{4}-(\d{2}-\d{2})/g, '$1')
          }
        }
      }
    },
    yAxis: {
      axisLine: {
        lineStyle: {
          color: '#fff'
        }
      },
      axisTick: {
        show: false
      },
      splitLine: {
        show: false
      }
    },
    backgroundColor: '#262932',
    series: [{
      name: '声量',
      type: 'line',
      smooth: true,
      symbolSize: 4,
      lineStyle: {
        normal: {
          color: '#F7B24F',
          width: 3
        }
      },
      itemStyle: {
        normal: {
          opacity: 0
        }
      },
      data: []
    }]
  };

from echarts-for-weixin.

Ovilia avatar Ovilia commented on May 5, 2024

我这没报错,你是否在微信开发者工具中将详情的基础库版本设到 1.9.91 了呢?

from echarts-for-weixin.

kiccer avatar kiccer commented on May 5, 2024

原来是因为我用的1.9.1。。。 →_→

from echarts-for-weixin.

Ovilia avatar Ovilia commented on May 5, 2024

更新了例子,参见柱状图

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.