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

pimatic-charts

v0.0.4

Published

Pimatic plugin for chart support

Downloads

4

Readme

pimatic-charts

version downloads license

This plugin provides a chart device for the pimatic frontend. It is based on highcharts.

Please make feature requests!

Features

  • Chart device
  • Gauge device
  • Many customization options

Installation

Just activate the plugin in your pimatic config. The plugin manager automatically installs the package with his dependencys.

Configuration

You can load the plugin by adding following in the config.json from your pimatic server:

{
  "plugin": "charts",
  "debug": true
}

Usages

The devices are based on the built-in variable device from pimatic.

Chart device

The device needs only one configured variable. The config has a default y axis definition. You can assign each variable to one y axis. But also all variables to the same axis.

chart image

Example chart device:

{
  "variables": [
    {
      "name": "pressure",
      "expression": "$wetter.pressure",
      "type": "number",
      "chart": "areaspline",
      "yaxis": 2,
      "dashstyle": "Solid",
      "color": "#a6c96a"
    },
    {
      "name": "temperature",
      "expression": "$wetter.temperature",
      "type": "number",
      "step": false,
      "chart": "areaspline",
      "yaxis": 0,
      "dashstyle": "Solid",
      "color": "#f28f43"
    },
    {
      "name": "humidity",
      "expression": "$wetter.humidity",
      "type": "number",
      "step": false,
      "chart": "spline",
      "yaxis": 1,
      "dashstyle": "Solid"
    },
    {
      "name": "windspeed",
      "expression": "$wetter.windspeed",
      "type": "number",
      "chart": "spline",
      "yaxis": 3,
      "dashstyle": "Solid"
    }
  ],
  "echo": {
    "additionalNames": []
  },
  "id": "testchart",
  "name": "Weather",
  "class": "ChartDevice",
  "xlabel": "x-label",
  "height": 250,
  "subtitle": "Subtitle",
  "timerange": "7d",
  "legend": true,
  "interval": 5,
  "yaxis": [
  {
    "label": "Temperature",
    "unit": "°C"
  },
  {
    "label": "humidity",
    "opposite": true,
    "unit": "%"
  },
  {
    "label": "pressure",
    "unit": "mbar"
  },
  {
    "label": "windspeed",
    "unit": "m/s",
    "opposite": true
  }
],
"allowzoom": true,
"allowtrace": true,
"datebuttons": [
  {
    "label": "3day",
    "count": 6,
    "unit": "day",
    "datagrouping": true
  },
  {
    "label": "1min",
    "count": 1,
    "datagrouping": false,
    "unit": "minute"
  },
  {
    "label": "3day",
    "count": 3,
    "unit": "day",
    "datagrouping": false
  },
  {
    "label": "ALL",
    "unit": "all",
    "count": 0,
    "datagrouping": false
  }
],
"showdatepicker": true
},

Gauge device

gauge image

Example gauge device:

{
  "scale": 0.8,
  "variables": [
    {
      "name": "Tank",
      "expression": "$tank",
      "type": "number",
      "min": 0,
      "max": 30000,
      "unit": "liter",
      "showRange": true,
      "label": "Tank level"
    },
    {
      "name": "Power",
      "expression": "$power",
      "type": "number",
      "min": 0,
      "max": 5000,
      "unit": "kW/h",
      "showRange": true,
      "label": "Power"
    }
  ],
  "echo": {
    "additionalNames": []
  },
  "id": "gauge",
  "name": "Gauge Device",
  "class": "GaugeDevice"
},

ChangeLog

  • 0.0.1 : First public version
  • 0.0.2 :
    • BUGFIX (#1: UTC)
    • dashStyle included
  • 0.0.3 :
    • line colors
    • date picker
  • 0.0.4 :
    • FIX #5 & #6

LICENSE

This plugin is licenses under CC BY-NC 3.0 and is not free for commercial and Governmental use.

Credits

This plugin uses highchart. Highcharts JS v6.0.2 (2017-10-20) (C) 2009-2016 Torstein Honsi www.highchart.com