Custom Speedometer Widget

Overview


The Custom Speedometer Widget lets you display a single number as a speedometerWe even remember the highest value you've shown over the last 30 days.


Getting Data into Dash


There are two different ways to get Speedometer widget data into Dash. The easiest way is for us to fetch it from a URL that you specify. Right now we grab new data for speedometer widgets every 30 seconds, but we may decide to change this later.

If you have a Pro or Business account, you also have the option of pushing your data to us. This requires a little more work to set up, but it also means your updates will show up instantly.

The data you provide can be in either Text or JSON format (details below).

Source Data


The format for the widget's source is incredibly simple. It's just the number that you want it to show, without any formatting.

So, if you want to show something like the penguins example above, just open your favorite text editor, type the number 48634, and save the file as plain text.
48634
If the number is big, we'll automatically take care of displaying a shortened version. For example, we'll show 5364312 as 5.3m.

The next step is to get this CSV data into Dash. We recommend that beginners fetch data from a URL, but pushing your data to us works great too.

Formatting Your Data


If you want to get fancy, you can also tell us how you want us to display your data. In order to do that, you'll need to make your source data available as JSON.

For example, let's say you have a speedometer that you're using to display time values that can be as low as 50 milliseconds and as high as 15 minutes. In that situation, you'd send small values like this:
{
  "value": 486,
  "formatted": "486ms"
}
and larger values like this:
{
  "value": 420000,
  "formatted": "7 min"
}
That way we'll know exactly what you mean by "486ms" and "7 min", and we'll know exactly where to point the speedometer's needle.

Setting Speedometer Ranges


By default, the far left side of the speedometer is 0, and the far right side of the speedometer is the highest value you've shown over the last 30 days. This usually works pretty well, but if you want, you change also change these start and end values.

For example, if you want the speedometer to be all the way to the left at 300 and all of the way to the right at 10,000, you'd send start and end values like this:
{
  "value": 486,
  "start": "300",
  "end": "10000"
}

30 Day Max (and min)


We automatically keep track of the 30 day maximum and minimum values that you've shown on your speedometer so we'll know which direction to point the needle. All you have to do is give us the current speedometer value and we'll take care of the rest.

Suggestions


If you have any suggestions about how we can make the Custom Speedometer widget better, be sure to let us know!

Feedback and Knowledge Base