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

charts-helper

v1.0.5

Published

大屏图表基础组件

Downloads

1

Readme

使用说明

只能用于vue 2.x中

1、插件安装

npm install charts-helper --save

2、插件引入方式

1、在main.js中引入chartsHelper
import { ScreenFooter, ScreenHeader, Charts, ScreenMap} from 'charts-helper'
import 'charts-helper/charts-helper.css'
2、引入使用
Vue.use(ScreenFooter);
Vue.use(ScreenHeader);
Vue.use(Charts);
Vue.use(ScreenMap);
3、在需要的界面中直接使用该插件
例如:
<screen-header :imgurl="require('@/assets/img/header.png')" title="测试平台"></screen-header>
<screen-footer :imgurl="require('@/assets/img/footer.png')"></screen-footer>
<charts :width="500" :height="300" :is-title="true" :title-text="'用量'" ref-name="chart1" :y-axis="{}" :options="options" :series="series" :x-axis="xAxis" :charts-img="require('@/assets/img/k_1.png')"></charts>
<screen-map :width="1000" :height="700" ref-name="chart3" :options="options" :series="series3" :visual-map="visualMap"></screen-map>

3、插件所包含的组件以及组件可传属性

| 组件名称 | 作用 | 备注 | | ---------------- | ---------------------------------------------------- | ---------------------------------- | | charts组件 | 能够让使用者快速的使用折线图,柱状图,饼图等基本图表 | ./src/assets/chartsimple.png | | ScreenHeader组件 | 让用户设置大屏的标题 | ./src/assets/headersimple.png | | ScreenFooter组件 | 让用户设置大屏的表尾 | ./src/assets/footersimple.png | | ScreenMap组件 | 地图展示 | |

(1)charts组件

| 属性名称 | type | default | 备注 | | ----------- | ------- | ------------------------------ | ------------------------------------------------------------ | | ref-name | string | | 必填,ref属性名称,引入多个组件时,请保持每个组件的该属性值都不一样! | | width | number | | 必填 | | height | number | | 必填 | | options | object | | 除x,y轴和series之外的属性设置 | | charts-img | string | | echarts所在区域的背景图片地址示例:require('../static/banner.png'),注意,一定要使用require该方式 | | x-axis | object,array | | 图表x轴设置 | | y-axis | object,array | | 图表y轴设置 | | series | array | | 必填,图表series数据 | | is-title | boolean | false | 是否显示图表标题 | | title-text | string | | 标题文字 | | title-color | string | '#FFFFFF' | 标题文字颜色 例如:‘#ffffff' | | title-font | string | | 标题文字设置,例如:15px arial,sans-serif |

(2)ScreenHeader组件

该组件默认高度为72px

| 属性名称 | type | default | 备注 | | -------- | ------ | ------- | ------------------------------------------------------------ | | title | string | | 大屏header内的标题文字 | | imgurl | string | | 大屏header的背景图片地址例如:require('@/assets/img/header.png'),引入时候,需要加require引入 |

(3)ScreenFooter组件

该组件高度默认为 24px

| 属性名称 | type | default | 备注 | | -------- | ------ | ------- | ------------------------------------------------------------ | | imgurl | string | | 大屏footer的背景图片地址例如:require('@/assets/img/footer.png'),引入时候,需要加require引入 |

(4)ScreenMap组件

| 属性名称 | type | default | 备注 | | ----------- | ------ | ------- | ------------------------------------------------------------ | | ref-name | string | | 必填,ref属性名称,引入多个组件时,请保持每个组件的该属性值都不一样! | | width | number | | 必填 | | height | number | | 必填 | | options | object | | 除series和visual-map之外的属性设置例如:title: {text: "全国疫情地图展示",textStyle: {color: "gold",fontStyle: "normal",},left: "center",top: "40px",} | | series | array | | 地图series属性数据,注意:不要传入data数据,data数据请在属性series-data属性里面传入 | | series-data | array | | series里面的data数据例如:{ name: "北京", value: "100" },[{ name: "天津", value: "200" },], | | visual-map | object | | 在地图左侧小导航图标属性例如:visualMap: {show: true,x: "left",y: "center",splitList: [{ start: 500, end: 600 },{ start: 400, end: 500 },{ start: 300, end: 400 },{ start: 200, end: 300 },{ start: 100, end: 200 },{ start: 0, end: 100 },]color: ["#5475f5","#9feaa5","#85daef","#74e2ca","#e6ac53","#9fb5ea",]} |