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

ni-webcharts

v10.0.2

Published

webcharts graph, chart, intensity graphs, plots and axes

Downloads

825

Readme

Webcharts Build Status Coverage Status

Webcharts

Web components for plotting engineering and scientific data with a focus on performance.

Usage example:

Import ni-webcharts

npm install --save ni-webcharts

Add a graph to a webpage:

<html>
<head>
    <link rel="stylesheet" href="node_modules/ni-webcharts/styles/webchartsLight.css" />
    <!-- include all script files listed in https://github.com/ni-kismet/webcharts/blob/master/exampleScripts.json -->
</head>

<body>
    <ni-cartesian-graph value="[[0, 10, 200, 3, 40, 500, 6, 70, 800], [1, 2, 3, 4, 5]]">
      <ni-cartesian-axis show label="Time" show-label axis-position="bottom"></ni-cartesian-axis>
      <ni-cartesian-axis show label="Amplitude" show-label axis-position="left"></ni-cartesian-axis>
      <ni-cartesian-plot show label="Plot 1">
        <ni-cartesian-plot-renderer line-width="1"></ni-cartesian-plot-renderer>
      </ni-cartesian-plot>
      <ni-cartesian-plot show label="Plot 2">
        <ni-cartesian-plot-renderer line-width="1"></ni-cartesian-plot-renderer>
      </ni-cartesian-plot>
    </ni-cartesian-graph>
</body>
</html>

Webcharts main elements

ni-cartesian-graph is the element that allows you to shows graphs. Add one to a html page and it will be shown as a graph, rendering the data you pass to it in the value attribute. See the Graph Data types formats section for information on the data types supported. The graph is rendered according to the options passed in a series of webcharts components nested inside the main element.

ni-chart is the element that allows you to show charts. The difference from a graph is that the chart has an internal buffer of historical values, called a HistoryBuffer.

ni-intensity-graph is the element that allows you to show intensity graphs. An intensity graphs shows values arranged in 2d data structure as an image with the values represented according to a specified color gradient.

Webcharts nested elements

ni-cartesian-axis is an element that adds a cartesian axis to one of the main elements.

ni-cartesian-plot is an element that adds a plot description to one of the main elements.

ni-cartesian-plot-renderer adds a plot renderer to a plot, specifying the way the data is rendered - line color, line width, bars, points, fill and many other options.

ni-color-scale adds a color scale to an intensity chart

Documentation

Read the API Documentation.

The documentation for the webcharts is written in markdown and is stored inline in the source code. The tool that extracts the documentation from the source files and updates the documents in the docs folder is invoked by typing:

npm run docs

Read Supported datatypes and decimations for current status.

Version and Deployment

  • This package is versioned according to semantic versioning.
  • The version must be bumped using the npm version command (https://docs.npmjs.com/cli/version). This increments the version in package.json, creates a tag with the same version name, and commit both to the local repository.
  • Push the commit and tag using git push --follow-tags. With a passing CI this will automatically trigger a deployment to NPM.

Changelog

Read the Changelog.

WebGL

In order to use WebGL for drawing, the gl argument must be set to true in the address bar of any page:

http://localhost/performance/scatter_graph.html?gl=true

This drawing is still experimental and is working for points only.