Customise on scatter chart

Hi everyone!

I’m new with mongodb and charts and I can’t figure out somethings that seem to be basic stuff. The main thing on this question is that I to sort the “priceToday” as shown in the picture

. Also I’d like to put more than one value on the Tooltip Detail. Can anyone help with these questions???

Hi @Guilherme_de_Carvalh -

Regarding the sort order: are your prices stored as strings or numbers? Strings are supposed to sort in alphabetical order (which will work for numbers only if they all have the same number of digits). However it looks like there may be a bug with the geo scatter chart where the values are not sorted correctly. We’ll look to get this fixed, however it should work today if your prices are numbers. If you are storing them as strings for some reason, you can change the type in Charts by clicking the … button on the priceToday field in the left pane and choosing Convert Type.

Regarding multiple Tooltip Detail fields - this is on our backlog, but unfortunately not supported today.


1 Like

Hello @tomhollander. You’re right, I wrongly saved the prices as strings. However, I converted them on the aggregation (with $toDouble) and on the Convert Type and the problem persists. It’s a little weird, because it’s able to bin, and when it does, it sorts correctly, but if I toogle it off, it becomes random. Moreover, in the Fields column priceToday is shown as Number, but on the color it’s shown as String. I’m sending another print to show it.


Also, is there a roadmap I can follow to see when the multiple Tootip Detail Fields will be ready? Finally, are the plans to implement tooltip on the heat maps too?

Thanks @Guilherme_de_Carvalh.

You’re right, they don’t seem to sort correctly as doubles either. However (for whatever reason) they do seem to sort as decimals (convert using $toDecimal) which is the best type to use for prices anyway. Can you try that and see if it works? Failing that you could also try adding an explicit $sort stage to the pipeline. We’ll also work to fix all of these sorting issues on geo scatter charts.

The use of the “A” symbol on the encoding panel was a deliberate design choice, but one that we’ve seen has confused people so we’re planning on changing it. Basically the icon shows “A” for strings since Color is a category channel - similarly if you put a string in an aggregation channel it will show a “#” since the count of the string is numeric - but we’re planning to show the original type icon to avoid the confusion.

Unfortunately we haven’t scheduled the work for the multiple tooltip detail fields, but I’ll see if we can sneak it in when we have some spare capacity.


Hi @tomhollander, unfortunatly it didn’t work… I’m sending a full screenshot, maybe it’ll help you to see what’s going on.

Interesting. A similar scenario with decimal types is working for me, but maybe it’s just luck / data dependent. We’ve basically had a regression for this chart type where sorting isn’t being applied to the series, so the behaviour is likely non-deterministic. We’ll look at the bug ASAP and should be able to get it in our release in ~3 weeks time.



Hi, @tomhollander
I dont know how to create new post, so I replay you here .
I try to install MongoDB Charts, but got errors!
So I run docker run and got these outputs:
:heavy_check_mark: parsedArgs
:heavy_check_mark: installDir (’/mongodb-charts’)
:heavy_check_mark: log
:heavy_check_mark: salt
:heavy_check_mark: productNameAndVersion ({ productName: ‘MongoDB Charts Frontend’, version: ‘1.9.1’ })
:heavy_check_mark: gitHash (undefined)
:heavy_check_mark: supportWidgetAndMetrics (undefined)
:heavy_check_mark: tileServer (undefined)
:heavy_check_mark: tileAttributionMessage (undefined)
:heavy_check_mark: rawFeatureFlags (undefined)
:heavy_check_mark: stitchMigrationsLog ({ completedStitchMigrations: })
:heavy_check_mark: featureFlags ({})
:heavy_multiplication_x: chartsMongoDBUri failure: ENOENT: no such file or directory, open ‘/run/secrets/charts-mongodb-uri’
:heavy_multiplication_x: tokens failure: ENOENT: no such file or directory, open ‘/mongodb-charts/volumes/keys/charts-tokens.json’
:heavy_multiplication_x: encryptionKeyPath failure: ENOENT: no such file or directory, open ‘/mongodb-charts/volumes/keys/mongodb-charts.key’
:heavy_check_mark: lastAppJson ({})
:heavy_check_mark: stitchConfigTemplate
:heavy_check_mark: libMongoIsInPath (true)

The error only happends on my Centos 7 system
docker stack deploy -c charts-docker-swarm-19.12.2.yml mongodb-charts works fine on Ubuntu18.04LTS.
my docker version is 19.03.6

Thanks you very much for helping!