Changing the number of significant digits on bar graph- possible?

More
07 Feb 2017 02:06 #87432 by nigel-tufnel
nigel-tufnel created the topic: Changing the number of significant digits on bar graph- possible?
Question- how do you decrease the number of significant digits on the add on pyvcp spindle speed bar graph in Axis? I want to just display the RPM to one RPM resolution (i.e. XXXX rpm; not XXXX.X rpm). Adding <format>"4.0f"</format> to the <bar> section didn't change anything.

Thanks.
More
07 Feb 2017 02:52 #87433 by tommylight
tommylight replied the topic: Changing the number of significant digits on bar graph- possible?
More
09 Feb 2017 02:01 #87629 by nigel-tufnel
nigel-tufnel replied the topic: Changing the number of significant digits on bar graph- possible?
Thanks for the link. Could not find any help there.

Anyone else have ideas?

Thanks
More
09 Feb 2017 02:56 #87631 by cmorley
cmorley replied the topic: Changing the number of significant digits on bar graph- possible?
from source:
        # update value
        newvalue=pycomp[self.halpin]
        if newvalue != self.value:
            self.value = newvalue
            valtext = str( "%(b)3.1f" % {'b':self.value} )
            self.itemconfig(self.val_text,text=valtext)
            # set bar colour

so it is hard coded to 3.1f
you could edit the file pyvcp_widgets.py locally to change it.

Chris M
More
11 Feb 2017 01:59 #87791 by nigel-tufnel
nigel-tufnel replied the topic: Changing the number of significant digits on bar graph- possible?
Thanks! That did the trick!
Time to create page: 0.119 seconds
Powered by Kunena Forum