Jump to content
Software FX Community

Animate Guage Bug in Values - Random


mreschke

Recommended Posts

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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...