npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@dinert/echarts

v0.1.66

Published

基于echarts二次封装的vue组件

Downloads

6

Readme

Vue components based on echarts secondary encapsulation

Installation

Using npm:

$ npm i '@dinert/echarts'
$ yarn add '@dinert/echarts'

In a browser:

<script src="http://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/lodash.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/echarts/5.3.2/echarts.min.js"></script>
<script src="lib-umd.js"></script>

In a Esm

<template>
    <div style="height: 400px;">
     <d-echart @callback="callback" @config-callback="configCallback" :chart-data="chartData"></d-echart>
    </div>
</template>
<script>
    import {DEchart} from '@dinert/echarts'

    export default {
        components: {
            DEchart
        },
        data() {
            return {
          _autoTooltip: 3000,
          _isGradualColors: false,
          title: {
            text: 'Stacked Line'
          },
          tooltip: {
            trigger: 'axis'
          },
          legend: {
            data: ['Email', 'Union Ads', 'Video Ads', 'Direct', 'Search Engine']
          },
          grid: {
            left: '3%',
            right: '4%',
            bottom: '3%',
            containLabel: true
          },
          toolbox: {
            feature: {
              saveAsImage: {}
            }
          },
          xAxis: {
            type: 'category',
            boundaryGap: false,
            data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
          },
          yAxis: {
            type: 'value'
          },
          series: [
            {
              name: 'Email',
              type: 'line',
              stack: 'Total',
              data: [120, 132, 101, 134, 90, 230, 210]
            },
            {
              name: 'Union Ads',
              type: 'line',
              stack: 'Total',
              data: [220, 182, 191, 234, 290, 330, 310]
            },
            {
              name: 'Video Ads',
              type: 'line',
              stack: 'Total',
              data: [150, 232, 201, 154, 190, 330, 410]
            },
            {
              name: 'Direct',
              type: 'line',
              stack: 'Total',
              data: [320, 332, 301, 334, 390, 330, 320]
            },
            {
              name: 'Search Engine',
              type: 'line',
              stack: 'Total',
              data: [820, 932, 901, 934, 1290, 1330, 1320]
            }
          ]
        }
        }
    }
</script>

DEchart Attributes

| 参数 | 说明 | 类型 | 可选值 | 默认值 | | :--------: | :---------------: | :----: | :---------------: | :----: | | chart-data | echarts的options | Object | 一 | {} | | type | echarts的图表类型 | Object | echarts的图表类型 | line |

chart-data下的echarts额外属性

| 参数 | 说明 | 类型 | 可选值 | 默认值 | | :--------------: | :------------------------: | :-----: | :--------: | :----: | | _autoTooltip | 自动轮播tooltip时长 | number | | 一 | | _autoDownPlay | 自动播放饼图的downplay时长 | number | | 一 | | _isGradualColors | 是否是渐变颜色 | boolean | false/true | true |

DEchart Events

注意事项

1、当chart-data中有configCallback和callback的函数时,执行的是chart-data对象中的configCallback和callback 2、如果要执行下面的函数请删除chart-data属性中的configCallback和callback 3、cb是一个函数回调的是echarts的配置项,图表渲染时会使用这个配置项,所以请这样使用cb({}),对象为空时不会使用。

| 事件名称 | 说明 | 回调参数 | | :------------: | :----------------: | :------------------: | | configCallback | 图表渲染之前的回调 | (options, chart, cb) | | callback | 图表渲染完成的回调 | (chart, options) |