Jump to content

Color changing speedometer


Recommended Posts

Hi Francisco,

You may want to have a look at one of our mods: 

It is very easy to use, as you just drop the .mod file onto your Spotfire dashboard. It then picks up columns from your data set to be displayed. And then you can start configuring the gauge mod (or speedometer) depending on your use case. It has color coding based on variables, min. and max values and you can specify the number of gauges if you want to (set the gauge parameter so it will be displayed for each value of that parameter).

If the mod doesn't do what you want from it, you can also try the JSViz (JavaScript Visualization) Framework for Spotfire® JSViz (JavaScript Visualization) It requires a bit more of work to set up, but it also provides for dials, gauges, etc.

Kind regards,

David

 

Link to comment
Share on other sites

8 hours ago, David Boot-Olazabal said:or speedometer) depending on your use case. It has color coding based on variables, min. and max values and you can specify the number of gauges if you want to (set the gauge parameter so it will be displayed for each value of that parameter).

Hi David,

Thanks you very much for your

help me!. 

I locate the “Gauge.mod” file, but when I drag it into Spotfire analysis it gives me an error: “The display mod could not be read.”

 

IMG_5693.jpeg

Link to comment
Share on other sites

Hi Francisco,

What is your Spotfire version? I think I tried this in Spotfire 14.

But there is also a previous version available. If you scroll down a bit, you can see this:

image.thumb.png.e7e28460667a4fc4df74ea3edaa5ac95.png

In the Download Previous Releases, you can 'Pick a prior release'. In the screenshot above, I picked the 1.0.1 version, which then can be downloaded via the Download button in the red rectangle.

Hope that one works with your version of Spotfire.

Kind regards,

David

image.png

Link to comment
Share on other sites

Thanks David for your David!.

Could I ask you the last two questions? 1) It is possible to enlarge the letter “MW” that appears below each Gauge, and the value that appears inside the semicircle.

2) Is it possible that the color changes depending on the value shown by the Gauge (e.g.: above 90 is green, between 60 and 90 is yellow and below 60 is red? Is it possible to change the gray background color that is seen in the non-complete part from the bar?

 

regards,

 

Francisco

 

Link to comment
Share on other sites

Hi Francisco,

Great to see that one worked for you. Coming back to your questions, I'm not sure if you are able to change either the Labels (as "MV") or have a single gauge with thresholds. As it is all embedded in the java code, it is hard to make those changes yourself.

There are a couple of ways though, to get 'your' gauge. First option is to use the JSViz framework. This package has a .sdn file to be deployed on the Spotfire server as well as over 15 dashboard examples (including d3gauges.dxp). This may be better suited, but if you want to make changes, you have to code it in the javascript files.

The second option, and I have attached an old sample I used for another customer project, is to use an html text area in combination with a js script. In the below side-by-side comparison, you can see that a different category has a different color, depending on the thresholds that have been set in the js script:

image.thumb.png.c6ce7201bacee42663e246e085cb5daa.png

Kind regards,

David

Gauges.dxp

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...