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

hexachart

v0.9.0

Published

Hexagon based data-viz ## Quick Run ```html <html> </head> <script src="https://unpkg.com/vue"></script> <script src="https://cdn.jsdelivr.net/npm/hexachart/dist/HexaChart.umd.min.js"></script> </head> <body> <div id="app" class="container"> <hexa-s

Downloads

4

Readme

hexachart

Hexagon based data-viz

Quick Run

<html>
</head>
  <script src="https://unpkg.com/vue"></script>
  <script src="https://cdn.jsdelivr.net/npm/hexachart/dist/HexaChart.umd.min.js"></script>
</head>
<body>
<div id="app" class="container">
  <hexa-stack-chart :data="hsData" :texts="hsTexts" :colors="hsColors"/>
</div>
<script>
  // Comment the following line and uncomment the bellow line to use as plugin
  Object.keys(HexaChart).forEach(name => {
    Vue.component(name, HexaChart[name])
  })
  // Uncomment to use as a plugin
  // const plugin = {
  //   install: Vue => {
  //     Object.keys(HexaChart).forEach(name => {
  //       Vue.component(name, HexaChart[name])
  //     })
  //   }
  // }
  // Vue.use(plugin)
  const hsData = [52.5, 26.3, 21.2]
  const hsColors = ['#666666', '#999999', '#cccccc']
  const hsTexts = ['Alpha', 'Beta', 'Gamma']
  const vm = new Vue({
    data() {
      return {
        hsData,
        hscolors,
        hsTexts
      }
    },
  }).$mount('#app')
</script>
</body>
</html>

In a Vue Project

npm i hexachart
...
</template>
<script>
import * as HexaChat from 'HexaChart'
export default {
  name: 'Demo',
  components: {
    HexaChat.HexaStackChart,
    ...    
  },
  ...

Components

HexaStack

Minimal Example

<template>
<div>
  <hexa-stack-chart
    data="data"
    :colors="colors"
    :texts="texts"
  />
</div>
</template>

<script>
import { HexaStackChart } from 'HexaChart'
export default {
  name: 'Demo',
  components: {
    HexaStackChart
  },
  data () {
    return {
      data: [52.5, 26.3, 21.2],
      colors: ['#666666', '#999999', '#cccccc'],
      texts: ['Alpha', 'Beta', 'Gamma']
    }
  }
}
</script>

<style>
/** Fluid & Fixed responsive **/
.hc-hexastack {
  width: 170px;
  height: 530px;
}
</style>

Props

| prop | type | default | description | |------|------|---------|-------------| | data | Array | [] | The main data, array of floats, e.g. [3.5, 4, 16]. The size precede the data sum in priority, that means if size is greater than the data sum, the remaining cells will be filled by offColor, while if it is lesser it will be truncated | | colors | Array | ['#f67055'] | Colors to be used (reserve order with data) | | texts | Array | [] |Array of strings that will be used as legend (reserve order with data) | | offColor | String | '#757575' | default color for any inactive cell (hexagon) | | size | Number | 100 | The Total number of cells | | columns | Number | 5 | The number of columns | | rows | Number | 20 | The number of rows | | horizontal | Boolean | false | Either or not the hexastack is horizontal, default is vertical | | animation | Boolean | true | Either or not use animation, if false no animation will play | | animationDuration | Number | 3000 | Animation duration time in milliseconds, do not set to 0, use animation false instead | | animationOptions | Object |{delay: 0, easing: 'Bounce', easingEdge: 'Out'} | Object of tweenjs like animation | | gradientSpread | Number | .5 | How much the gradient will spread, 0 for sharp separation|

HexaPie

Minimal Example

<template>
<div>
  <hexa-pie-chart
    :data="data"
    :texts="texts"
  />
</div>
</template>

<script>
import HexaPieChart from 'HexaChart'
export default {
  name: 'Demo',
  components: {
    HexaPieChart
  },
  data () {
    return {
      data: [32, 18],
      texts: ['Alpha', 'Beta']
    }
  }
}
</script>

<style>
.hc-hexapie {
  width: 316px;
  height: 234px;
}
.hc-hexapie-text {
  fill: #ffffff;
  font-size: 20px;
}
.hc-hexapie-legend {
  font-size: 20px;
  fill: #999999;
}
</style>

Props

| prop | type | default | description | |------|------|---------|-------------| | data | Array | [] | The main data, array of floats, e.g. [3.5, 4, 16]. This data are represented as percentage on the pie chart | | colors | Array | ['#666666', '#f56042'] | Colors to be used (reserve order with data) | | texts | Array | Array of strings that will be used as legend (reserve order with data) | | radius | Number | 116 | Radius of the pie | | curve | Number | 0.8 | A float between 0..1 that indicate how rounded are the hexagon conrners, 0 would make it a circle and 1 a hexagon | | animation | Boolean | true | Either or not use animation, if false no animation will play | | animationDuration | Number | 3000 | Animation duration time in milliseconds, do not set to 0, use animation false instead | | animationOptions | Object |{delay: 0, easing: 'Bounce', easingEdge: 'Out'} | Object of tweenjs like animation |

HexaInception

Minimal Example

<template>
<div>
  <hexa-inception-chart
    :data="data"
    :texts="texts"
    :unit="unit"
  />
</div>
</template>

<script>
import HexaInceptionChart from 'HexaStack'
export default {
  name: 'Demo',
  components: {
    HexaInceptionChart
  },
  data () {
    return {
      data: [107228, 76561],
      texts: ['Alpha', 'Beta'],
      unit: 'M'
    }
  }
}
</script>

<style>
.hc-hexainception {
  width: 500px;
  height: 500px;
}
</style>

Props

| prop | type | default | description | |------|------|---------|-------------| | data | Array | [] | The main data, Ordered array of floats, e.g. [16, 5, 2] | | colors | Array | ['#666666', '#f56042'] | Colors to be used (reserve order with data) | | texts | Array | Array of strings that will be used as legend (reserve order with data) | | unit | String | '' | Unit used in the legend, if left empty it will be ommited | | curve | Number | 0.8 | A float between 0..1 that indicate how rounded are the hexagon conrners, 0 would make it a circle and 1 a hexagon | | animation | Boolean | true | Either or not use animation, if false no animation will play | | animationDuration | Number | 3000 | Animation duration time in milliseconds, do not set to 0, use animation false instead | | animationOptions | Object |{delay: 0, easing: 'Bounce', easingEdge: 'Out'} | Object of tweenjs like animation |

HexaBubule

Minimal Example

<template>
<div>
  <hexa-buble-chart
    :data="data"
  />
</div>
</template>

<script>
import HexaBubleChart from 'HexaStack'
export default {
  name: 'Demo',
  components: {
    HexaBubleChart
  },
  data () {
    return {
      data: [
        {d: 30222 name: 'GrandPa1', id: 1, children: [
          {d: 5600, name: 'Pa1_1', id: 11, children: [
            {d: 130932 name: 'Kid1_1_1', id: 111},
            {d: 89921 name: 'Kid1_1_2', id: 112},
            ...
          ]},
          {d: 66554, name: 'Pa1_2', id: 12, children: [
            ...
          ]},
          ...
        ]},
        ...
      ]
    }
  }
}
</script>

<style>
.hc-hexabuble {
  width: 100%;
  height: 500px;
}
.hc-hexabuble-chart {
  border: #000 solid 1px;
}
.hc-hexabuble-legend {
  font-size: 16px;
  fill: #999999;
}
</style>

Props

| prop | type | default | description | |------|------|---------|-------------| | data | Array | [] | The main data, One way bound Tree with leafs being on the format {d: 89921 name: 'name to be displayed', id: 1} and parent having an additional children attribute, which is an array of other nodes| | colors* | undefined | undefined | not yet implemented | | unit | String | '' | Unit used in the legend, if left empty it will be ommited | | curve* | undefined | undefined | not yet implemented | | animation | Boolean | true | Either or not use animation, if false no animation will play | | animationDuration | Number | 3000 | Animation duration time in milliseconds, do not set to 0, use animation false instead | | animationOptions | Object |{delay: 0, easing: 'Bounce', easingEdge: 'Out'} | Object of tweenjs like animation |