jQWidgets Forums

jQuery UI Widgets Forums Chart OnReady and OnResize events in Charts

This topic contains 2 replies, has 2 voices, and was last updated by  Peter Stoev 10 years, 11 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • OnReady and OnResize events in Charts #59472

    SergPro
    Participant

    I change styles/classes for labels in a chart after the init, the changes get lost after browser windows size changes and causes chart to repaint. Is there a way to register a handler when that happens?
    Thanks

    OnReady and OnResize events in Charts #59477

    SergPro
    Participant

    The following code changes css for a label in the chart, these changes get lost when you resize browser window. I’m looking for a way to stop this from happening or temporarily put a function to be executed on refresh to set this back in.
    ………
    $(chart).jqxChart(settings);

    setTimeout(function () {
    $(chart).find(‘.jqx-chart-label-text’).each(function (i, obj) {
    $(obj).css(‘font-size’, ’26px’).css(‘font-weight’, ‘bold’).css(‘color’, ‘#ff6600’).css(‘fill’, ‘#ff6600’);
    });
    }, 1000);

    OnReady and OnResize events in Charts #59484

    Peter Stoev
    Keymaster

    Hi SergPro,

    Is not it better to define these styles on your page instead of doing hacks like that?
    If you want to register resize handler, you can register such on your browser window – $(window).resize(function(){// your code});

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

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

You must be logged in to reply to this topic.