Jump to content
Software FX Community
Sign in to follow this  

Animate Guage Bug in Values - Random

Recommended Posts

mreschke    0

Did not see a forum for jChartFX web version.  To clarify, I am talking about jChartFX using their cfx.gauage.radialGauge, not .NET...


I have moved this topic to the community.jchartfx.com site...didn't realize jcharfx was put in a separate community.


Downloaded the full jChartFX package a week ago (not licensed), built a very simple gauge, works great.  Notice the needle value should be right at 82.  Everytime I refresh the page the needle varies a bit.  It seems to just pick a random value around 82.  If I hover over the needle it may be 79.0 one time, 80.95 the next, then 81.1...what the heck.


I noticed, if I turn off animations, this doesn't happen, needle is exactly at 82 every time.  I notice on slower devices like a phone (android), the need stops even lower, so around 60 - 70.  


So animation bug?  Tested in Firefox and Chrome.  Phone is android with chrome.  All three are bad values when animation enabled.

/** * Create a jChartFX radial gauge chart from a widget * @param  {object} widget * @return {void} */function radialGauge(widget){	// Chart Values	var min = 65;	var max = 100;	var value = 82;	var limit1 = 74;	var limit2 = 82;	var name = 'Test';	// New jChartFX Object	var chart = new cfx.gauge.RadialGauge();	chart.setMainValue(value);	// Titles	var title = new cfx.gauge.Title();	chart.getTitles().add(title);	title = chart.getTitles().getItem(0);	title.setText(name);	// Scale	var scale = chart.getMainScale();	// Sections 1st	var section = new cfx.gauge.ScaleSection();	section.setFrom(min);	section.setTo(limit1);	scale.getSections().add(section);	// Sections 2nd	section = new cfx.gauge.ScaleSection();	section.setFrom(limit1);	section.setTo(limit2);	scale.getSections().add(section);	// Sections 3rd	section = new cfx.gauge.ScaleSection();	section.setFrom(limit2);	section.setTo(max);	scale.getSections().add(section);	scale.setMin(min);	scale.setMax(max);	// Animations	chart.getAnimations().getLoad().setEnabled(true);	// Display Chart	chart.create('myChartDiv');};
Edited by mreschke

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this