AdminTom
(Product Manager, MongoDB)
My feedback
-
1 vote
An error occurred while saving the comment -
37 votes
An error occurred while saving the comment AdminTom (Product Manager, MongoDB) commented
We plan to add this in the SDK before too long, but I can't provide a timeline now. However, if you're keen it is actually possible to do this already.
If you look at the network traffic for rendering a chart (for example, https://charts.mongodb.com/charts-tomh-yfpqi/embed/charts?id=ed1cc666-850e-4f42-8b58-b6c85424ac36) you'll see a request that returns the JSON data (in this case, https://us-east-1.aws.webhooks.mongodb-realm.com/api/client/v2.0/app/charts-tomh-yfpqi/service/http/incoming_webhook/embedding?tolerance=3600&id=ed1cc666-850e-4f42-8b58-b6c85424ac36)
So you can invoke this endpoint to download the data as JSON. The SDK changes will likely just be a friendly wrapper over the same.
-
1 vote
An error occurred while saving the comment AdminTom (Product Manager, MongoDB) commented
You should be able to use the Convert Type option to convert the array to numbers. Any non-numeric values will be converted to null, and the numeric accumulates should work.
-
2 votes
An error occurred while saving the comment AdminTom (Product Manager, MongoDB) commented
Thanks for the suggestion Arnold! We're looking at how best to handle this scenario.
Rather than tie it to filters, we were thinking of adding a new method to the SDK that would let you do something like:
chart.setField("startDate", new Date("2020-09-07"))This would result in the requested value being added early in the agg pipeline for each document, i.e. with:
{ $addFields: { startDate: ISODate("2020-09-07") } }Then if you wanted to leverage it in your own query, you could simply refer to "$startDate" and it would contain the value set from the code.
Let me know if you think this will work.
-
27 votes
An error occurred while saving the comment AdminTom (Product Manager, MongoDB) commented
Note that if you click the Zoom button on any chart, it does go into a responsive mode. This can be useful when viewing dashboards on a mobile device too.
I've been reluctant to make the dashboard view responsive by default, as many charts require a specific size to look good, and having the charts change size based on the user's browser could mean the author's preferred chart dimensions wouldn't apply.
How would people like this to behave? Would a separate mobile-friendly / responsive view be enough, or should the default dashboard view be responsive?
AdminTom (Product Manager, MongoDB) shared this idea ·
-
3 votes
An error occurred while saving the comment AdminTom (Product Manager, MongoDB) commented
Thanks Caylan - this is definitely on our radar - will probably look at Number and Gauge charts first, and then consider how to apply it to other charts later.
-
2 votes
An error occurred while saving the comment AdminTom (Product Manager, MongoDB) commented
Thanks Thomas. I agree this isn't great, I'll create a bug to track. In the meantime you can set a Maximum value to something >0 and the chart will look better.
-
3 votes
An error occurred while saving the comment AdminTom (Product Manager, MongoDB) commented
Thanks Stefan-Gabriel. If you only want to see true values, you can add a filter on the field to achieve this.
In addition, we're looking at adding a new "count by value" aggregation on string and boolean types which would automatically create series from the values discovered in the field.
Do either/both of these work for you?
-
2 votes
An error occurred while saving the comment AdminTom (Product Manager, MongoDB) commented
Hi Johan - while you can only have a single filter document on an embedded chart, the document can be as complex a filter as you want, e.g:
{ foo: 1, bar: 'x', baz: { $gt: 4 } }
....or even
{ $or: [ { foo: 1 }, { bar: 'x', baz: { $gt: 4 } } ] }
Can you explain a scenario where this doesn't give you the required flexibility?
-
3 votes
An error occurred while saving the comment AdminTom (Product Manager, MongoDB) commented
Hi John, can you give an example? When we have aggregation channels it means the chart expects a number (e.g. to show the length of a bar). In the case where you only have one document in a category, an aggregation like Sum, Min or Max will all return the raw value.
-
24 votes
An error occurred while saving the comment AdminTom (Product Manager, MongoDB) commented
Thanks Tom. It is actually possible to embed a dashboard already by sharing the dashboard with a public link and embedding that inside an IFRAME. Can you elaborate on exactly what additional functionality you would like to see?
An error occurred while saving the comment AdminTom (Product Manager, MongoDB) commented
Hi Arunima. Note that you can share a dashboard via a public link. For Charts on Atlas, this can be loaded in an iframe. For Charts on-prem, we set HTTP headers that prevent the dashboard from loading in a frame. We'll look at removing this restriction in a future on-prem release.
-
4 votes
An error occurred while saving the comment AdminTom (Product Manager, MongoDB) commented
Thanks for following up. So you are correct that verified signature embedding never used the filter whitelist - this only applies to unauthenticated and the new authenticated embedding. While we are deprecating verified signature embedding (since authenticated is generally easier and more powerful), we won't be disabling it any time soon and we'll make sure we support the document-level whitelisting you require before we do this. So it is fine to keep using verified signature in the meantime if this has the features you need.
An error occurred while saving the comment AdminTom (Product Manager, MongoDB) commented
Thanks for the suggestion. We haven't ever changed the behaviour here - it was always necessary to whitelist each exact field you want to use. However I think this is a valid feature request for people that use dynamic schemas.
In the meantime, you could work around this by using the Verified Signature embedding model which does not use whitelists.
-
24 votes
An error occurred while saving the comment AdminTom (Product Manager, MongoDB) commented
Hi Christopher - neither for now. You can already safe a chart as a PNG by right-clicking on it and using the browser menu. More options for exporting charts and dashboards will be considered in the future, so please vote for this and/or comment with more info on the scenarios that matter to you.
AdminTom (Product Manager, MongoDB) shared this idea ·
-
258 votes
AdminTom (Product Manager, MongoDB) supported this idea ·
-
21 votes
An error occurred while saving the comment AdminTom (Product Manager, MongoDB) commented
Note that you can already choose a dark theme when rendering embedded charts. Allowing the main Charts app to use a dark theme is something we're looking at doing soon.
AdminTom (Product Manager, MongoDB) shared this idea ·
-
9 votes
AdminTom (Product Manager, MongoDB) responded
Timeout was increased from 60 seconds to 90 seconds. There aren’t currently plans to increase it further, but keeping the issue open in case it needs it be looked at again in the future.
An error occurred while saving the comment AdminTom (Product Manager, MongoDB) commented
In the latest cloud release we have increased the query timeout from 60 to 90 seconds.
AdminTom (Product Manager, MongoDB) shared this idea ·
-
5 votes
An error occurred while saving the comment AdminTom (Product Manager, MongoDB) commented
Hi Brian -
That's a good idea. We will be looking at enhancing binning next year so I'll see if we can do something along those lines.
In the meantime, it is possible to achieve what you're looking for with a calculated field. For example you could create a field with a definition like this:
{
$switch: {
branches: [
{ case: { $lt: [ '$age, 18 ] }, then: "0-18" },
{ case: { $lt: [ '$age', 30 ] }, then: "18-30" },
],
default: "30+"
}
}One thing to consider is that the resulting labels will be strings, so you'll need to choose names that put them in the right order with an alphabetical sort.
-
3 votes
An error occurred while saving the comment AdminTom (Product Manager, MongoDB) commented
Hi Arunima, "allowDiskUse" should be set by default on all queries. Are you sure this is not being set for your queries?
-
2 votes
An error occurred while saving the comment AdminTom (Product Manager, MongoDB) commented
Thanks for the suggestion Brian. We did want to include US counties, but there are many counties with the same names in different states, so this would require further development to let you map a separate "disambiguating" field (i.e. a state). We would still like to build this at some stage though.
I have not investigated parishes or boroughs so I'm not sure if they have a similar issue with name clashes. If not (and if you can find a GIS file showing the boundaries and with a suitable licence), we can probably add them fairly easily.
-
18 votes
An error occurred while saving the comment AdminTom (Product Manager, MongoDB) commented
Thanks for the additional info Brian. We're looking into how best to make this work, but the idea is to have a new "dynamic" data source type which could map to something like "mydb.*" or "*.sales". When rendering a chart using a dynamic data source, you'd need to resolve it to a specific collection that matches the pattern, using an experience similar to filtering.
Would this meet your needs?
AdminTom (Product Manager, MongoDB) shared this idea ·
Thanks for the suggestion Daan. We are looking at making changes to data sources that will address this.