Hello,
I would like help formatting the linear gauge control so it looks like a fundraising thermometer, and has a similar look to this:
Hello,
Thank you for the fast reply. This was a good start. I'd like it to look like the sample, however, I'm looking for additional functionality...
|
Query |
Details | |
|
I'm looking for the color that is purple right now to be red. |
The "colorStop" property in the “linearGradient” property of pointer can be used to change the color. Please refer the below code snippet and sample link for your reference.
Code Snippet:
| |
|
I'm looking for there to be a starting value and a "goal" or maximum value displayed. Right now in the demo, it shows the starting value (0), I'd like it to specify a goal value that shows at the maximum value. For example, if the goal was $1000, the maximum value should say $1000 at the top of the thermometer |
We can achieve this requirement by labels of the Linear Gauge axis. The “axisLabelRender” event will be fired when a label is rendered. Using the "axisLabelRender" event, we can customize the start and maximum values of the axis labels and hide other labels. Please find the code snippet below for your reference. Please find the sample from the last response for your reference.
Code Snippet:
| |
|
I'm also looking for it to display and fill up to the current value. For example, if there were $257 dollars currently donated, it should say the current value off to the side adjacent to where the thermometer is filled up to. |
Using the "axisLabelRender" event, we can also display the label for the current value of the Linear Gauge. Please find the sample link from the next response.
| |
|
I'm also looking for the following. Let's say the thermometer is currently at the value $257. If the value were to change to $467, I'd like there to be a smooth animation moving the "liquid" in the thermometer and the "cursor" (implemented in the last bullet point) to the new value ($467, in this example) |
Use the "animationDuration" property in the pointers to animate the pointer of the Linear Gauge.
In the below sample link, we updated the thermometer pointer value with a button click and animation is provided to it.
|
This is exactly what I'm looking for! I'll make sure to reply to this thread if any complications occur. Thank you!