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

@brandandcelebrities/viz

v5.1.4

Published

Collection of charts

Downloads

270

Readme

B&C Viz

npm i -S @brandandcelebrities/viz

Test

You can test components by navigating to folder and running npm start

Charts

Jump to Release Notes Jump to TODO

Followers

Installation

import { Followers } from '@brandandcelebrities/viz';
// or
import Followers from '@brandandcelebrities/viz/dist/js/charts/Followers';

// And include once CSS File
import '@brandandcelebrities/viz/dist/css/charts/followers.css'; // Only Followers chart's styles
// or
import '@brandandcelebrities/viz/dist/css/viz.css'; // All styles

Props

| Props | Type | Default | Description | | ------------- |:-------------:|:--------:|:------------| | data | Object | required | See data explanations below | lexique | Object |required | See lexique explanations below |locale| String or Number|"en-GB" |Locale of the user for i18n | formats | Object | See below | See formats explanations below |margin| Object | false|See margin explanations below | color | String | "purple" | CSS base color for the chart | mobile | Boolean | false | Display mobile design instead of Desktop/Tablette

data

data is an Object that uses the exact following keys:

| Key | Type | Default | Description | | ------------- |:-------------:|:--------:|:------------| | dates | Array | required | List of dates like "2018-01-15" | community | Array<Number or null> | required | List of the community count every day. If there is null values the chart will try to fill the gap everywhere it can. | engagement | Array<?Number or null> | required | List of the engagement every day. If there is null values the chart will try to fill the gap everywhere it can. | content | Array<Number or null> | required | List of the content count every day. For example the number of tweets posted every day. null values won't be displayed.

Example:

data: {
  dates: ['2018-01-15', '2018-01-16', '2018-01-17'],
  community: [ 26639, 26754, null],
  engagement: [ 1766.599975585938, 1515.5, null],
  content: [ 3, 1, null]
}

lexique

lexique is an Object that uses exact keys. For example in English we may have the following:

  lexique: {
    chart: {
      tooltip: {
        community: 'Community:',
        engagements: 'Average engagement:',
        publications: 'Publications:',
      },
      legends: {
        community: 'Community',
        engagements: 'Average engagement (1 month)',
        publications: 'Publications',
      },
      noData: 'There is no data available for the selected period.',
    },
  },

formats

formats is an Object that uses the following keys:

| Key | Type | Default | Description | | ------------- |:-------------:|:--------:|:------------| | date | String | "DD/MM/YYYY" | Format for the dates

margin

margin is an Object that uses the exact following keys:

| Key | Type | Default | Description | | ------------- |:-------------:|:--------:|:------------| | top | Number | 0 | Top margin value | right | Number | 0 | Right margin value | bottom | Number | 0 | Bottom margin value | left | Number | 0 | Left margin value

Example

<Followers
    data={data}
    color={'red'}
    lexique={lexique}
/>

Release Notes

  • [2022-11-23] 5.1.4
    • Update Fix simpleNumberFormatter utils with thoushand separator
  • [2022-11-23] 5.1.3
    • Update Axis: data format by props, Number: custom separator
  • [2022-07-15] 5.1.2
    • Update Fix tooltip if empty data
  • [2021-10-14] 5.1.1
    • Update Moved react-scripts to devDependencies, it's not used in production
  • [2021-04-29] 5.1.0
    • Update Update Viz
  • [2021-04-29] 5.0.0
    • Update Rollback Viz for incompatibility Influence
  • [2021-04-29] 4.0.0
    • Update Add clone fonction to avoid mutable value
  • [2021-01-31] 3.0.0
    • Update Update all dependencies with major version !!!(Incompatible INFLUENCE)
  • [2019-11-07] 2.1.7
    • Fix Improve Y scale rounding
  • [2019-09-20] 2.1.6
    • Update packages versions
  • [2019-09-20] 2.1.4
    • Update Revert packages updates
  • [2019-05-31] 2.1.3
    • Update packages updates
    • Update Tooltip: Improve number formater with thousand separator
  • [2019-05-31] 2.1.2
    • Update number formater
  • [2019-03-22] 2.1.0
    • Update version to 2.x.x
  • [2019-03-22] 1.1.0
    • Fix dependencies with an unpublished har-validator version
    • Update react-script
  • [2018-09-24] 1.0.11
    • Update design and font
  • [2018-09-18] 1.0.10
    • Update design to kolsquare
  • [2018-08-01] 1.0.7
    • Fix documentation typos
  • [2018-08-01] 1.0.6
    • Followers documentation added

TODO