You must be logged in to post your query.
Home › Forums › Chart Support › Styling Charts in React
Tagged: CSS, React, styling
Hello, how do you style charts in React?
I have attempted to do so by referencing their class names in my .css file, as well as by passing them in inside my options object, but neither method works.
If you could let me know how I could pass style values for properties like “backgroundColor”, “position”, “display”, in CanvasJS’s React integration (as props, hopefully), that’d be great! — Thanks!
@mepc36,
You can style the chart container by passing the style attributes as containerProps as shown in this example.
— Shashi Ranjan Team CanvasJS
Awesome, thank you Shashi!
You must be logged in to reply to this topic. Login/Register