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 🙏

© 2026 – Pkg Stats / Ryan Hefner

flowline-echarts-vue3

v0.0.5

Published

echarts折线图流光效果实现

Downloads

15

Readme

flowline-echarts-vue3

实现效果

图片出错了

使用包管理器

我们建议您使用包管理器(如 NPM、Yarn 或 pnpm)安装

# 选择一个你喜欢的包管理器
# NPM
$ npm install flowline-echarts-vue3 --save

# Yarn
$ yarn add flowline-echarts-vue3

# pnpm
$ pnpm install flowline-echarts-vue3

需要额外安装Echarts依赖

# 选择一个你喜欢的包管理器
# NPM
$ npm install echarts --save

# Yarn
$ yarn add echarts

# pnpm
$ pnpm install echarts

组件使用

定义echarts options

import { FlowLineEcharts } from "flowline-echarts-vue3";
import "flowline-echarts-vue3/style.css";

// 正常定义echarts options
const optionsProps = {
    xAxis: {
        type: "category",
        data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]
    },
    yAxis: {},
    series: [
        {
            data: [820, 932, 901, 934, 1290, 1330, 1320],
            type: "line",
            symbol: "none",
            smooth: true,
            flowLineConfig: {
                enabled: true,
                colorStep: ["#CF0B4499", "#CF0B4400"],
                radiusStep: [2, 2],
                lineLength: 100,
                dur: 4,
                animateStep: 0.01,
                delay: 100,
            }
        },
    ]
}

/** 主要在series中折线图的flowLineConfig配置流光效果, 以下为默认值即对应解释
{
    enabled: true, // 开启关闭流光效果
    colorStep: ["#CF0B4499", "#CF0B4400"], // 流光效果头尾颜色,如果一致则为纯色,如果为不同颜色,会自动生成渐变色
    radiusStep: [2, 2], // 流光头尾半径长度,设置不同长度可展示彗星效果
    delay: 100, // 两次流光动画之间循环的间隔
    //以下三个值协同控制流光长度
    lineLength: 100, // 流光是由lineLength个圆进行动画运动组成的视觉效果,此处定义圆的个数
    dur: 4, // 流光的圆沿折线图执行完一次动画所需要的时间
    animateStep: 0.01, // 上一个圆开始运动后,下一个圆开始运动的时间间隔,如果流光运动速度较快,防止出现明显锯齿,需要调小该值
}
*/

将optionProp传给组件

<flow-line-echarts :options-prop="optionsProps" ref="flowLineRef"></flow-line-echarts>

调用组件setOption方法

const flowLineRef = ref();
// 如果options是动态变更的值,则需要使用nextTick,等待组件读取options成功后调用
nextTick(() => {
    flowLineRef.value.setOptions();
});