Column Charts, also referred as Vertical Bar Charts, are rectangular bars with lengths proportional to the values that they represent. The given example shows column chart along with react code that you can run locally.
Read More >>
/* App.js */ var React = require('react'); var Component = React.Component; var CanvasJSReact = require('./canvasjs.react'); var CanvasJS = CanvasJSReact.CanvasJS; var CanvasJSChart = CanvasJSReact.CanvasJSChart; class App extends Component { render() { const options = { title: { text: "Basic Column Chart" }, data: [ { // Change type to "doughnut", "line", "splineArea", etc. 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} */ /> {/*You can get reference to the chart instance as shown above using onRef. This allows you to access all chart properties and methods*/} </div> ); } } module.exports = App;
You can change the color of individual dataPoints using color property or change its width using dataPointWidth.