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

uniapp-component-echarts

v0.1.0

Published

封装了 echarts 的 uniapp 组件,可能是目前 Github 中使用最简单最容易理解的封装,基于 [echarts-for-weixin 微信小程序](https://github.com/ecomfe/echarts-for-weixin)。

Downloads

6

Readme

uniapp-component-echarts

封装了 echarts 的 uniapp 组件,可能是目前 Github 中使用最简单最容易理解的封装,基于 echarts-for-weixin 微信小程序

安装

  1. npm i echarts uniapp-component-echarts
  2. 拷贝 uniapp-component-echarts/components/ECharts 到你的项目的 components 目录。

示例

Tip1: echarts 完整压缩包仍然很大(~760KB),而小程序一般限制编译后体积不超过 2M,示例仅为方便,建议实际开发时使用定制版 echarts。

Tip2: 仅在 微信小程序、百度小程序 测试通过,其他端请自行验证

<template>
    <e-charts canvas-id="zphhhhh" :option="option" width="100%" height="600px" />
</template>

<script>
import ECharts from '@/components/ECharts';

export default {
    components: { ECharts },

    data() {
        return {
            option: {
                legend: {
                    orient: 'horizontal',
                    bottom: 10,
                    data: ['0-10万', '10-100万', '100-1000万', '1000-5000万', '5000万以上']
                },
                series: [{
                    type: 'pie',
                    radius: '36%',
                    minAngle: 5,
                    selectedOffset: 5,
                    data: [
                        {
                            value: 600000000000,
                            name: '5000万以上',
                            selected: false
                        },
                        {
                            value: 18000000,
                            name: '1000-5000万',
                            selected: true,
                            label: {
                                normal: {
                                    textStyle: {
                                        color: '#ff9000'
                                    },
                                    formatter: '\n{b}\n(共{c}万)\n当前企业地位'
                                }
                            }
                        },
                        {
                            value: 1200000,
                            name: '100-1000万',
                            selected: false
                        },
                        {
                            value: 110000,
                            name: '10-100万',
                            selected: false
                        },
                        {
                            value: 1200,
                            name: '0-10万',
                            selected: false
                        }
                    ],
                    markPoint: {
                        symbol: 'pin',
                        label: {
                            normal: {
                                show: 1
                            }
                        }
                    },
                    label: {
                        color: '#666',
                        fontSize: 11,
                        formatter: '\n{b}\n(共{c}万)\n'
                    },
                    labelLine: {
                        normal: {
                            lineStyle: {
                                color: '#666'
                            },
                            length: 20,
                            length2: 20
                        }
                    },
                    itemStyle: {
                        emphasis: {
                            shadowBlur: 10,
                            shadowOffsetX: 0,
                            shadowColor: 'rgba(0, 0, 0, 0.5)'
                        }
                    }
                }]
            }
        }
    }
}
</script>