Giter VIP home page Giter VIP logo

charts's Introduction

Netdata frontend SDK and chart utilities

Storybook

https://netdata.github.io/charts

Install

npm:

  $ npm install @netdata/charts

yarn:

  $ yarn add @netdata/charts

Develop

  $ yarn start

Build

There are 3 different distributions. The following command creates the different distributions in the ./dist folder

  $ yarn build

Build the distributions isolated

UMD produces a single file ./dist/sdk.min.js what contains the entire bundle

  $ yarn build:umd

ES6 Builds the files using ES Modules in ./dist/es6/* folder

  $ yarn build:es6

cjs Builds the files using CommonJS in ./dist/* folder

  $ yarn build:cjs

Testing

  $ yarn test

Lint

  $ yarn lint

charts's People

Contributors

alexnti avatar apostolidhs avatar billkalaitzis avatar burbuli8ra avatar christophidesp avatar dependabot[bot] avatar ivangergo3 avatar jacekkolasa avatar jjtsou avatar kapantzak avatar ktsaou avatar michaelgamel avatar novykh avatar ralphm avatar shyamvalsan avatar vinnygats avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

charts's Issues

Not able to import the Line chart and facing the error

import { Line } from "@netdata/charts" getting the Line module not found error on my react app

Able to import via import { Line } from "@netdata/charts/dist/components/line";

import { ThemeProvider } from "styled-components"
import { DefaultTheme } from "@netdata/netdata-ui/lib/theme"
import { Line } from "@netdata/charts/dist/components/line";
import { camelizeKeys } from '@netdata/charts/dist/helpers/objectTransform/index';
import makeMockPayload from '@netdata/charts/dist/helpers/makeMockPayload/index';
import systemLoadLineChart from "@netdata/charts/dist/fixtures/systemLoadLineChart";
import systemLoadLine from "@netdata/charts/dist/fixtures/systemLoadLine";
import makeDefaultSDK from '@netdata/charts/dist/makeDefaultSDK';

const getChartMetadata = () => camelizeKeys(systemLoadLineChart, { omit: ["dimensions"] })
const getChart = makeMockPayload(systemLoadLine[0], { delay: 600 })


export default function NttChart() {
    const sdk = makeDefaultSDK({ getChartMetadata });
    const chart = sdk.makeChart({ getChart });
    sdk.appendChild(chart);
    
    return (
      <>
        <ThemeProvider theme={DefaultTheme}>
             <Line chart={chart} height="315px" />
        </ThemeProvider>
      </>
    );
  };
  

For the above code getting the chartCannot read properties of null (reading 'onAttributeChange') error.

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.