Home forums Using CanvasJS Turn off rendering for set

Tagged: 

This topic contains 2 replies, has 2 voices, and was last updated by  Igor 7 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #14552

    Igor
    Member

    I’m trying to do bulk set for all chart’s on a page that have a large number of values based on user interaction with a page.

    roreach chart set
    chart.title.set(“fontColor”,hexColor);
    chart.legend.set(“fontColor”,hexColor);
    for each y and x axis
    x/yAxis.set(“titleFontColor”,hexColor);
    x/yAxis.set(“labelFontColor”,hexColor);

    because it renders them all in sequence it takes over 30 seconds sometimes. Is there a way to set all at once rather than one at a time?

    #14557

    Sanjoy
    Moderator

    Igor,

    set have a third parameter,
    updateChart: When true, Updates the chart automatically after setting the value. Defaults to true

    You can pass it as false when you don’t want to render for each set.

    Also you can use chart.options to change it’s property and calling chat.render at the end will update the changes to the chart.

    #14585

    Igor
    Member

    Thanks! Somehow I missed that part when skimming the set docs.

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

You must be logged in to reply to this topic.