jQWidgets Forums

jQuery UI Widgets Forums Chart Pie chart dynamic radius and radiusLabels

This topic contains 1 reply, has 2 voices, and was last updated by  Martin 6 years, 7 months ago.

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

  • jb
    Participant

    Hi,

    Similar to this, I am creating a pie chart with many items (+20) and some of them are really small while other large. Items with a small value are having label overlapping issues. I can go around this a little by adjusting the Radius and labelRadius values. As my values are dynamic, I would like to to this in the “beforeLoadComplete” of dataAdapter, but i have not found a method in the documentation allowing this. How would you recommend i dynamically adjust radius and labelRadius values?

    dataAdapter = new $.jqx.dataAdapter(source, { async: true, autoBind: true
    , beforeLoadComplete: function (records) {		
    	for (var i = 0; i < records.length; i++)
    	{
    		// nothing
    	}
    	
    	if( i > 20) // adjust radius/labelRadius
    	else if(i > 10) // adjust radius/labelRadius differently
    	
    	return records;
    	}
    });
    Pie chart dynamic radius and radiusLabels #102562

    Martin
    Participant

    Hello jb,

    When you are loading the data in the dataAdapter the chart is not yet created.
    So why don’t you just set two variables and then use them for the chart settings?
    Here is an Example.

    Best Regards,
    Martin

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

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

You must be logged in to reply to this topic.