Home Forums Chart Support Styling Charts in React

Styling Charts in React

Viewing 3 posts - 1 through 3 (of 3 total)
  • #27853

    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!



    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!

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.