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

@dingnl/ltvis-chart

v0.0.3

Published

探测设备绘图组件:按仪器画业务图,容器 + setOption,不提供页面壳

Readme


调用侧只拿容器和加工后的记录,不读仪器原始文件,也不搭页面壳。


安装

公开包装在 npm。仓库地址:https://registry.npmjs.org/。包页:https://www.npmjs.com/package/@dingnl/ltvis-chart

pnpm add @dingnl/ltvis-chart

也可用 npm i @dingnl/ltvis-chart 或 yarn add @dingnl/ltvis-chart。运行时依赖 d3-contour,会随包声明一并安装。本机若默认走镜像,在项目 .npmrc 写 @dingnl:registry=https://registry.npmjs.org/。

调用

import { Ltvis } from '@dingnl/ltvis-chart'

const lidar = Ltvis.Lidar.init(document.getElementById('chart'))
lidar.setOption({
    product: 'rcs',
    title: { text: '距离修正后的回波信号(532, a.u.)' },
    data: { values: records }
})

const ppi = Ltvis.Dwl.Ppi.init(document.getElementById('ppi'))
ppi.setOption({
    product: 'radial',
    data: { values: ppiRecords }
})

| 方法 | 用途 | | :-----------------------------: | -------------------------- | | setOption | 写入产品、标题与记录并绘图 | | resize | 容器尺寸变化后重绘 | | dispose | 销毁实例、释放画布 | | getDataURL | 导出当前图为图片 | | on / off / dispatchAction | 提示框或工具栏联动时再用 |

一条 setOption 只画一个产品。测风激光雷达的 DBS 必须写 source(sec / ave / los)。公开包装有版权水印,浏览器控制台会打印版权声明和联系方式,没有关闭这两项的接口。

记录字段

| 约定 | 只认 | | :--: | ----------------------------------------------------- | | 时间 | dateTime | | 站点 | stationCode + stationName | | 数值 | 列名与 product 同名(少数产品另有高度、距离等约定) | | 缺测 | 留空,不要填 0 |

仪器入口

入口只有 Ltvis。测风激光雷达写 Ltvis.Dwl.Ppi 这类路径。

| 仪器 | 入口 | | :------------: | ------------------------------------------------------------------------------------------------------------------------------ | | 气溶胶激光雷达 | Ltvis.Lidar | | 云雷达 | Ltvis.Cloud · Ltvis.Phase · Ltvis.Layers | | 微波辐射计 | Ltvis.Mwr | | 风廓线雷达 | Ltvis.Wpr | | 雨滴谱仪 | Ltvis.Rain | | 测风激光雷达 | Ltvis.Dwl.Dbs · Ltvis.Dwl.Ppi · Ltvis.Dwl.Rhi · Ltvis.Dwl.Cappi · Ltvis.Dwl.Stare · Ltvis.Dwl.Met · Ltvis.Dwl.Gp |

缩放

绘图区内滚轮缩放、拖拽平移默认开启。平移惯性与滚轮缓动默认关闭:

chart.setOption({
    dataZoom: { damping: true }
})

版权与授权

npm 上的公开包会在图容器上、下、左、右任意一边放一个正向的 Ltvis / DINGNL 字标并沿该边移动,导出图片同样带上。打开页面时,浏览器控制台会打印版本、编译日期、版权声明、文档地址和联系方式。setOption 以及其它公开 API 不能关闭水印或这条控制台信息,也不存在 setLicense 一类接口。

需要无水印版本时,向 dingnl 申请授权。获准后会另行交付离线安装包,用该目录覆盖 @dingnl/ltvis-chart 即可。调用代码与公开包相同,只写 Ltvis.*.init / setOption。授权包图上无水印,控制台会打印授权对象、版本、版权声明和联系方式,须保留。授权包不得转借、转售,也不得改写版权信息后对外提供。

申请授权:邮件 [email protected],或 QQ 1981261270,备注 ltvis-chart。


文档与示例

在线文档与示例:https://www.dingnl.com/chart/

产品中心:https://www.dingnl.com


联系作者

接入、定制或使用中遇到问题,欢迎直接联系作者。

各仪器、各产品的示例效果与接入说明见文档站。邮件可附复现数据或截图;即时沟通请加 QQ,备注 ltvis-chart。

| 方式 | 账号 | | :-----: | --------------------------------------------- | | 📧 邮箱 | [email protected] | | 💬 QQ | 1981261270 |