New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gauge doesn't hit max when exceeding maxValue #139

Closed
marcantonio opened this Issue Jun 27, 2017 · 3 comments

Comments

Projects
None yet
2 participants
@marcantonio
Contributor

marcantonio commented Jun 27, 2017

      var opts = {
          angle: 0.35,
          lineWidth: 0.15,
          radiusScale: 1,
          pointer: {
              length: 0.6,
              strokeWidth: 0.035,
              color: '#000000'
          },
          limitMax: false,
          limitMin: false,
          colorStart: '#C0C0DB',
          colorStop: '#33C3F0',
          strokeColor: '#EEEEEE',
          generateGradient: true,
          highDpiSupport: true
      };
      var target = document.getElementById('canvas-gauge');
      var gauge = new Donut(target).setOptions(opts);
      gauge.minValue = 0;
      gauge.maxValue = 800;
      gauge.setTextField(document.getElementById('gauge-textfield'));
      gauge.animationSpeed = 8;
      gauge.set(850);

screen shot 2017-06-27 at 10 17 18 am

@kplindegaard

This comment has been minimized.

Show comment
Hide comment
@kplindegaard

kplindegaard Jun 27, 2017

Collaborator

Behavior used to be that the max values would be increased by 10% if the input exceeded maxValue.

Recently the limitMax flag was introduced to prevent this for Gauge, but I don't remember if anyone ported that across to Donut...? Anyhow, you should set the limitMax options flag to true just for the record. If the maxValue is still automatically increased (you could try to print it to the console to see for yourself as well), there is an issue.

Collaborator

kplindegaard commented Jun 27, 2017

Behavior used to be that the max values would be increased by 10% if the input exceeded maxValue.

Recently the limitMax flag was introduced to prevent this for Gauge, but I don't remember if anyone ported that across to Donut...? Anyhow, you should set the limitMax options flag to true just for the record. If the maxValue is still automatically increased (you could try to print it to the console to see for yourself as well), there is an issue.

@marcantonio

This comment has been minimized.

Show comment
Hide comment
@marcantonio

marcantonio Jun 30, 2017

Contributor

maxValue is still increased.

Contributor

marcantonio commented Jun 30, 2017

maxValue is still increased.

@marcantonio

This comment has been minimized.

Show comment
Hide comment
@marcantonio

marcantonio Jun 30, 2017

Contributor

Fixed here: #140

Contributor

marcantonio commented Jun 30, 2017

Fixed here: #140

@kplindegaard kplindegaard closed this in #140 Jul 8, 2017

kplindegaard added a commit to kplindegaard/gauge.js that referenced this issue Jul 8, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment