Comments (4)
Hi. Gauge is drown on a canvas, so it's a bitmap and does not have any relation to CSS. As a result there is no way to hide specific ticks unless changing drawing algorithm itself. So within core implementation it is currently not possible.
from canvas-gauges.
It is opensource under MIT license, so, please, feel free to do any modifications. There is no limits, so you can fork, modify and pull your changes. All that is highly appreciated!
from canvas-gauges.
Hi Mikhus, thanks for the reply. I probably used CSS when I did not need to. I looked more deeply in your code and I found that the config changes all of the Major ticks and not just one. I understand that it would be difficult to extend the config on the "strokeStyle" of the majorTicks (ctx.strokeStyle = config.colors.majorTicks;). What if I wanted to do something like the following:
majorTicks: [{tick:'0', color:'#000000'}, '10', '20', '30', '40', '50', '60', '70', '80', '90', '100'],
Could I extend your library to change the configuration? I would prefer not to change the code in gauge.js, however maybe I could create a "plugin" of sorts that could extend it and apply what I am describing?
I think you have done an excellent job of making these gauges possible using html5 canvas! Very very cool stuff, keep up the great work!
from canvas-gauges.
This feature will be added in upcoming release 2.0.4. It will be possible to specify specific colors for major ticks and tick numbers separately as arrays of colors instead of a single color value. For example:
<canvas data-type="radial-gauge"
data-major-ticks="0,50,100,150,200"
data-color-numbers="transparent,red,green,blue,black"
data-color-major-ticks="black,red,green,blue,black"
></canvas>
from canvas-gauges.
Related Issues (20)
- can't assign a deferent value to multiple gauges in one page
- canvas to SVG HOT 1
- Only Half of Linear Gauge appearing in Home Assistant HOT 1
- Horizontal rotating gauge
- No valuebox when using a horizontal linear gauge?
- radial gauge seems to be broken. HOT 2
- Upstream Dependency Conflicts
- Congratulations on your AWESOME script! HOT 1
- AnimationRule HOT 1
- Unable to change Highlight HOT 1
- Interactive Gauges
- Gauge title spanning two lines? HOT 2
- deviation mode for linear gauges HOT 1
- Canvas-Gauge HOT 1
- Draw problem after a few value updates HOT 4
- RadialGauge animationTarget = "plate" turning needle issue HOT 1
- compass gauge with int values HOT 1
- howto adjust LinearGauge to container without cutting scale
- CSS warnings "Expected color but found ‘null’
- is there a possibility to read logarithmic scales in stead of linear? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from canvas-gauges.