Code Monkey home page Code Monkey logo

t-digital-gauge's People

Contributors

dependabot[bot] avatar xiaomitangtang avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

t-digital-gauge's Issues

值为0时显示为负

1、gaugeType":"donut",decimals设置无效,始终显示2位小数
2、值为0时,显示 -0.00

关于import

谢谢更新。
发现两个小问题,
1、在用DigitalGauge时,必须要import { Knob, Swtich, DigitalGauge } from "t-digital-gauge2";而不能
import { DigitalGauge } from "t-digital-gauge2";
2、相比第一版的用法改动较大,比如去掉了使用option设置参数

需要单独赋值才能显示value吗

1、我的option如下:
widgetOption: {
"gaugeType": "donut",
"minValue": "0",
"maxValue": "100",
"value": 10,
"showValue": true,
"valueFont":{
"family": "Roboto", "style": "normal", "weight": "500", "size": 18, "color": "#ffffff" }
}

this.gauge = new DigitalGauge(document.getElementById(this.elId), widgetOption);
此时中间的value值不会显示。
必须要单独赋值:
this.gauge.value = Math.random() * 100
//
另外浏览器报js错误如下:
Uncaught ReferenceError: str is not defined
at e.default.set time [as time] (digitalgauge.js?ba59:1)
at e.default.set value [as value] (digitalgauge.js?ba59:1)
at eval (digitalgauge.js?ba59:1)
at Array.forEach ()

2、在使用控件时,必须要import DigitalGauge from "t-digital-gauge2/dist/digitalgauge";
而不能 import DigitalGauge from "t-digital-gauge2";
否则会报错:
Uncaught TypeError: t_digital_gauge2__WEBPACK_IMPORTED_MODULE_1___default.a is not a constructor

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.