palerdot/react-d3-speedometer

Setting customSegmentStops does not show correctly

Closed this issue · 3 comments

屏幕快照 2019-09-17 下午7 36 01

When minValue is not set to 0, the meter is incomplete!
                  <ReactSpeedometer
                    className="speedometer"
                    needleTransition="easeElastic"
                    needleTransitionDuration={1500}
                    width={150}
                    height={100}
                    ringWidth={20}
                    value={212.46}
                    currentValueText="212.46%"
                    maxValue={300}
                    minValue={90}
                    customSegmentStops={[90, 120, 150, 200, 240, 300]}
                    startColor="#FE4819"
                    endColor="#6AD72C"
                    forceRender
                  />

This issue can be fixed with the solution suggested in issue #51

image

@sudhir451 @JerryLMJ This issue is fixed and released in v0.7.1. Reference sandbox - https://codesandbox.io/s/jolly-thompson-2k3d7 ... Please upgrade to v0.7.1 which will address this issue. Thanks for bringing attention to this issue ...

Screenshot 2019-09-17 at 8 43 22 PM