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

ly-charts

v3.2.4

Published

基于echarts的 vue插件,用于配合实现图表组件

Downloads

11

Readme

项目安装/使用方法

  1. 拉取项目到本地文件夹内

  2. 安装 node(https://nodejs.org/en/ 下载 node)

  3. 打开电脑终端 输入node -v 和npm -v 看看是否出现对应的版本 出现--->安装完成

  4. 打开当前拉取文档的终端 输入 npm install 下载依赖项

  5. npm run serve 启动项目

  6. npm run build 打包项目

LyCharts 的使用方法

基本使用方法

1.安装npm包

npm i ly-charts -S
# or 
yarn add ly-charts

2.在main.js中引入

//导入echarts组件
import echarts from 'echarts'
//导入LyCharts组件
import LyCharts from 'ly-charts'
//导入主题部分
import Func from 'ly-charts/views/theme/index.js'
//导入LyCharts的css文件
import 'ly-charts/lib/styles/index.css'
//使用LyCharts
Vue.use(LyCharts)
//设置主题
Func(echarts)

3.使用对应的模块 (柱状图为例)

//使用组件
<template>
   <ly-bar
   :chartData="barData"
   ></ly-bar>
</template>

<script>
export default {
  data(){
    return{
      barData:{
        columns: ['time', 'water', 'gas'],
        rows: [
          {time: '1-1', water: '20', gas: '40'},
          {time: '1-2', water: '20', gas: '40'},
          {time: '1-3', water: '20', gas: '40'},
          {time: '1-4', water: '20', gas: '40'}
        ],
      }
    }
  }
}
</script>

4.数据传递

| 属性 | 数据类型 | 默认传递项 | 说明 | | :--: | :--: | :--: | :--: | | chartWidth | String | 100% | 图形宽度 | | chartHeight | String | 400px | 图形高度 | | chartData | Object | { columns: [], rows: [] }) | 传递数据 | | chartData/rows | Array | [] | 画图数据(包含 x 轴线显示数据) | | chartData/columns | Array | [] | 需要画图的选项(第一个数据为 x 轴显示数据) | | settings | Object | {} | 特殊配置项数据(一些特殊的配置项,方便修改) | | extend | Object | {} | 修改配置项(根据 echats 官网的 option 配置,修改画图的配置) | | series | Object或Array | {} | 修改option的series配置项