Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@canvasjs/react-charts

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@canvasjs/react-charts

CanvasJS React Charts - Official

  • 1.0.2
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
4K
increased by23.02%
Maintainers
1
Weekly downloads
 
Created
Source
CanvasJS

CanvasJS React Charts - Official

CanvasJS React Chart Component for creating interactive charts and graphs for your react applications. Library supports a wide range of chart types including bar, line, area, pie, doughnut, etc.


CanvasJS React Charts

Installing CanvasJS React Charts

Install CanvasJS React Charts to your application from npm.

Install React Charts via NPM
npm install @canvasjs/react-charts

See npm documentation to know more about npm usage.

Import React Chart Component

Import the React Chart module into your React application.

import CanvasJSReact from '@canvasjs/react-charts';
//var CanvasJSReact = require('@canvasjs/react-charts');

var CanvasJSChart = CanvasJSReact.CanvasJSChart;
Set the chart-options & create chart

Set the chart-options & use ‘CanvasJSChart’ selector to create the chart.

class App extends Component {
  render() {
    const options = {
      title: {
        text: "Basic Column Chart in React"
      },
      data: [{
        type: "column",
        dataPoints: [
          { label: "Apple",  y: 10  },
          { label: "Orange", y: 15  },
          { label: "Banana", y: 25  },
          { label: "Mango",  y: 30  },
          { label: "Grape",  y: 28  }
        ]
      }]
    }
    
    return (
    <div>
      <CanvasJSChart options = {options}
        /* onRef = {ref => this.chart = ref} */
      />
    </div>
    );
  }
}

React Column Chart
Interactive React Charts

React Interactive Charts


React Chart with Multiple Y-axes

React Chart with Multiple Y-axes


React Chart with Zooming / Panning

React Chart with Zooming / Panning


Keywords

FAQs

Package last updated on 29 Feb 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc