Home Forums Chart Support When exporting a chart to PNG, change the axis color.

When exporting a chart to PNG, change the axis color.

Viewing 2 posts - 1 through 2 (of 2 total)
  • #44663

    When exporting the chart to PNG with a dark background theme like Dark or Dark2, the axis color is displayed in white. However, when saving the chart as a PNG using the built-in function, the axis color remains white, making the axis invisible when inserted into a document. I wonder if it’s possible to utilize the chart options to change the axis color to black in the saved PNG image or to set the chart theme to light before saving it as a PNG.

    #44665

    sora,

    To change the axis colour before exporting the chart, you can change the theme to a light theme before export and revert it back after. Please take a look at this JSFiddle for an example of the same.

    Changing Theme in the Exported Image


    Ananya Deka
    Team CanvasJS

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

You must be logged in to reply to this topic.