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

jscatalyst

v1.2.41

Published

Open source Javascript toolkit for building dashboards

Downloads

26

Readme

JS Catalyst

Build Status DeepScan grade Coverage Status

An open source Vue component toolkit to quickly build realtime dashboards and allow for instant sharing of dashboards and charts

What is JS Catalyst for?

JS Catalyst was built to allow both designers and developers to create feature-rich and sleek dashboards. By creating charting components that accept flexible data it is easy to just drop a component in on any page and feed it the data.

Install

  • yarn: yarn add jscatalyst
  • npm: npm install jscatalyst

To use it directly in the browser please use the unpkg link. This will automatically load in the jscatalst.min.js file. Please also include the css for the project so that all charts and components will be styled correctly.

<script src="https://unpkg.com/jscatalyst"></script>
<script src="https://unpkg.com/jscatalyst/dist/jscatalyst.min.css"></script>

Generator

JSCatalyst has a Yeoman generator to make getting started a breeze. Install yo and the generator package generator-jscatalyst.

npm install -g yo
npm install -g generator-jscatalyst

Make a new directory and cd into it.

mkdir myproject && cd myproject

Run the generator

yo jscatalyst

Using Charts

In your main.js file where your app is created please make sure to import the minified css for JS Catalyst.

  import 'jscatalyst/dist/jscatalyst.min.css'

To use any of the charts or components in the package just import them and place them in a view. If the component is a chart it is important to wrap it in a div and give it a set height. All charts render based on the size of their parent container.

<template>
  <div class='example-page'>
    <div class="chart">
      <line-chart
        :dataModel='lineChartData'
        propID='example-line-chart'
        metric='Last Sale Price'
        title='Example Line Chart'
      ></line-chart>
    </div>
  </div>
</template>


<script>
  import { D3LineChart } from 'jscatalyst'

  export default {
    data: function() {
      return {
        lineChartData: [
          {"date": "2017-1-1", "value": 2},
          {"date": "2017-4-1", "value": 5},
          {"date": "2017-2-1", "value": 1},
          {"date": "2017-3-1", "value": 6},
          {"date": "2017-1-10", "value": 1}
        ]
      }
    },
    components: {
      'line-chart': D3LineChart
    }
  }
</script>

<style>
  .chart {
    height: 400px;
  }
</style>

Using Plugins

There are three plugins that are included in JS Catalyst. The encapsulate all the logic needed to add theming, screen-sharing, and authentication to your project. To use any of these plugins, import them in your main.js file and call Vue.use().

  import { ScreensharePlugin } from 'jscatalyst'

  Vue.use(ScreensharePlugin)

Both the authentication, and theme plugin require extra options to be passed to them. They rely on having a Vuex store and the Vue Router to be present and in use in your project.

  import { ThemePlugin, AuthPlugin } from 'jscatalyst'

  // pass in the Vuex store and an array of your themes
  Vue.use(ThemePlugin, {store, themes: ['Blue', 'Red', 'Grey']})

  // pass in the Vuex store, Vue Router, and the base URL of your api
  Vue.use(AuthPlugin, {store, router, baseURL: 'yourApiURL'})

Contributing

JS Catalyst is an open source project so we gladly accept help with adding new features and new components! To contribute please follow these steps,

  • Fork the JS Catalyst repo
  • Create a new branch for your feature (git checkout -b your-new-feature)
  • Test your new feature/component in our sandbox environment by placing it in the App.vue file and running npm start
  • Please make sure to include tests for your component or feature
  • Commit your changes (git commit -am 'Add new feature/component')
  • Push your code to your branch on Github (git push origin your-new-feature)
  • Create a pull request to be reviewed by our team

For guidelines on how to create a new component please see the JS Catalyst docs. Thanks for your help!