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

keen-theme-builder

v1.0.28

Published

CSS theme builder for Keen charts

Downloads

15

Readme

Theme Builder

Install with NPM

npm install keen-theme-builder --save

Live Demo

https://keen.github.io/theme-builder/

Usage

Use this component to create custom theme for your charts and generate JS/CSS files

Example


const options = {
  chart: { label: 'Line', value: 'line' }, // specifies which chart is rendered in mock-up section by default,
  // possible values are:
  // { value: 'default', label: 'Default' },
  // { value: 'bar', label: 'Bar' },
  // { value: 'line', label: 'Line' },
  // { value: 'spline', label: 'Spline' },
  // { value: 'step', label: 'Step' },
  // { value: 'area', label: 'Area' },
  // { value: 'pie', label: 'Pie' },
  // { value: 'donut', label: 'Donut' },
  // { value: 'gauge', label: 'Gauge' },
  // { value: 'funnel', label: 'Funnel' },
  // { value: 'funnel-3d', label: 'Funnel 3d' },
  chartPalette: { label: 'Dracula', value: 'dracula' }, // predefined color schemas, 
  // possible values
  // { label: 'Autocollector', value: 'autocollector' }
  // { label: 'Dracula', value: 'dracula' }
  // { label: 'Modern', value: 'modern' }
  // By default it's set to 'None'. Choose colors or chartPalette as chartPalette injects predifined color scheme into colors array.
  isDashboardBuilderActive: false, // defines which fields are hidden. For dashboard builder we hide tabs and chart types select. By default it's false
  colors: ['red', '#fff', 'rgb(0,0,0)'], // you can provide custom color pallette, valid CSS color properties are supported.
  'appearance_background': '#000', // string, valid CSS color properties are supported
  'appearance_border': '#000', // string, valid CSS color properties are supported
  'appearance_font_family': 'Acme', // general font, for getting current list of Google fonts please provide your Google Fonts API key in utils/consts.js
  'title_show': false, // by default it's false
  'title_text': '',
  'title_textAlign': 'left',
  'title_color': '#000', // string, valid CSS color properties are supported
  'title_font_family': 'Acme',
  'title_font_size': '16' // string, font size in pixels
    // possible values
    // [
    //   { label: "Auto", value: 'auto'},
    //   { label: "10", value: 10 },
    //   { label: "12", value: 12 },
    //   { label: "14", value: 14 },
    //   { label: "16", value: 16 },
    //   { label: "18", value: 18 },
    //   { label: "20", value: 20 },
    //   { label: "24", value: 24 },
    //   { label: "30", value: 30 },
    //   { label: "36", value: 36 },
    // ];
  'title_font_bold': false, // by default it's false
  'title_font_italic': false, // by default it's false
  'subtitle_show': false, // by default it's false
  'subtitle_text': '',
  'subtitle_textAlign': 'center', // possible values ['left', 'right', 'center']. By default it's 'left
  'subtitle_color': '#000', // string, valid CSS color properties are supported
  'subtitle_font_family': 'Acme',
  'subtitle_font_size': '16',
  'subtitle_font_bold': false, // by default it's false
  'subtitle_font_italic': false, // by default it's false
  'axis_vertical_title_show': false, // by default it's false
  'axis_vertical_title_text': '',
  'axis_vertical_title_textAlign': 'center', // possible values ['left', 'right', 'center']. By default it's 'left
  'axis_vertical_title_color': '#000', // string, valid CSS color properties are supported
  'axis_vertical_title_font_family': 'Acme',
  'axis_vertical_title_font_size': '16',
  'axis_vertical_title_font_bold': false, // by default it's false
  'axis_vertical_title_font_italic': false, // by default it's false
  'axis_vertical_label_show': false, // by default it's false
  'axis_vertical_label_color': '#000', // string, valid CSS color properties are supported
  'axis_vertical_label_font_family': 'Acme',
  'axis_vertical_label_font_size': '16',
  'axis_vertical_label_font_bold': false, // by default it's false
  'axis_vertical_label_font_italic': false, // by default it's false
  'axis_horizontal_title_show': false, // by default it's false
  'axis_horizontal_title_text': '',
  'axis_horizontal_title_textAlign': 'center', // possible values ['left', 'right', 'center']. By default it's 'left
  'axis_horizontal_title_color': '#000', // string, valid CSS color properties are supported
  'axis_horizontal_title_font_family': 'Acme',
  'axis_horizontal_title_font_size': '16',
  'axis_horizontal_title_font_bold': false, // by default it's false
  'axis_horizontal_title_font_italic': false, // by default it's false
  'axis_horizontal_label_show': false, // by default it's false
  'axis_horizontal_label_color': '#000', // string, valid CSS color properties are supported
  'axis_horizontal_label_font_family': 'Acme',
  'axis_horizontal_label_font_size': '16',
  'axis_horizontal_label_font_bold': false, // by default it's false
  'axis_horizontal_label_font_italic': false, // by default it's false
  'legend_show': false, // by default it's false
  'legend_color': '#000', // string, valid CSS color properties are supported
  'legend_font_family': 'Acme',
  'legend_font_size': '16',
  'legend_font_bold': false, // by default it's false
  'legend_font_italic': false, // by default it's false
  'legend_layout': 'left', // defines position of legend
  // possible values
  // { label: 'Top', value: 'top' },
  // { label: 'Right', value: 'right' },
  // { label: 'Bottom', value: 'bottom' },
  // { label: 'Left', value: 'left' }
  'legend_position_horizontal': '', // applies to the chart once legend_layout is set to `top` or `bottom`
  // possible values
  // { label: 'Left', value: 'left' },
  // { label: 'Center', value: 'center' },
  // { label: 'Right', value: 'right'}
  'legend_position_vertical': '', // applies to the chart once legend_layout is set to `left` or `right`
  // possible values
  // { label: 'Top', value: 'top' },
  // { label: 'Middle', value: 'middle' },
  // { label: 'Bottom', value: 'bottom' }
  'grid_show': false, // by default it's false
  'grid_lines_color': '#000', // string, valid CSS color properties are supported
  'grid_lines_count': '',
  // possible values
  // { label: 'Auto', value: '' },
  // { label: '1', value: 1 },
  // { label: '2', value: 2 },
  // { label: '3', value: 3 },
  // { label: '4', value: 4 },
  // { label: '5', value: 5 },
  // { label: '6', value: 6 },
  // { label: '7', value: 7 },
  // { label: '8', value: 8 },
  // { label: '9', value: 9 },
  // { label: '10', value: 10 },
  'subgrid_show': false, // by default it's false
  'subgrid_lines_color': '#000', // string, valid CSS color properties are supported
  'subgrid_lines_count': '',
}

const onChange = (data) => {
  console.log(data);
}

<Builder
  options={options}
  onChange={onChange} // defines function that gets current state as an input
/>