animationDuration在react-canvas-gauges上不起作用

时间:2019-07-17 14:22:05

标签: reactjs animation canvas gauge

我已经从npm安装了名为react-canvas-gauges的软件包,并且我尝试使用此软件包渲染仪表。一切正常,除了“动画持续时间”。 https://www.npmjs.com/package/react-canvas-gauges

                        <RadialGauge                            
                           animationDuration={1500}
                           animationRule={'linear'}
                           units='km/h'
                           fontUnits={25}
                           fontTitle={25}
                           colorNumbers={"#fff"} 
                           colorUnits={'#eee'}
                           colorTitle={'#eee'}                           
                           title='Speed'
                           width={170}
                           height={170}
                           value={this.state.vehSpeed}
                           valueInt={1}
                           valueDec={0}
                           valueBox={true}
                           minValue={0}
                           maxValue={300}
                           colorMajorTicks={"#e0e0e0"}
                           colorMinorTicks={"#e0e0e0"}
                           majorTicks={['0', '30','60','90','120','150','180','210','240','270','300']}
                           minorTicks={2}
                           highlights={[{from: "160", to: "300", color: "rgba(200, 50, 50, .75)"}]}
                           needleType={'arrow'}
                           needleWidth={4}
                           strokeTicks={true}
                           colorStrokeTicks={"#fff"}
                           borderShadowWidth={0}
                           borders={true}
                           colorBorderShadow={"#4285fa"} 

                         ></RadialGauge>

```sample which is working except animation
<RadialGauge                            
                           animationDuration={1500}
                           animationRule={'linear'}
                           units='km/h'
                           value={234}
</RadialGauge>
```

0 个答案:

没有答案