boardee icon indicating copy to clipboard operation
boardee copied to clipboard

Dashboard graph sorting

Open adrienbrault opened this issue 10 years ago • 1 comments

The graphs collection on a dashboard is not a cursor right now.

To be able to use a Graphs cursor, each graph should store it's position in a dashboard:

{
    "dashboardPositions": {
        "someDashboardId": "4"
    }
}

That way the query on a dashboard would be something like:

Graphs.find({_id: {$in: graphsIds}}, {sort: {"dashboardPositions." + dashboardId: 1}})

adrienbrault avatar Nov 27 '13 18:11 adrienbrault

The issue with the current sorting is that when a graphs is modified, meteor will refresh the DOM for all the graphs. With the suggested sorting, meteor would update only 1 graphs on the dashboard (would avoid reloading all the svgs)

adrienbrault avatar Nov 27 '13 18:11 adrienbrault