{"action":"closed","issue":{"url":"https://api.github.com/repos/madec-project/ezvis/issues/86","labels_url":"https://api.github.com/repos/madec-project/ezvis/issues/86/labels{/name}","comments_url":"https://api.github.com/repos/madec-project/ezvis/issues/86/comments","events_url":"https://api.github.com/repos/madec-project/ezvis/issues/86/events","html_url":"https://github.com/madec-project/ezvis/issues/86","id":118032677,"number":86,"title":"Histogram: sometimes bars are not chrono-ordered","user":{"login":"parmentf","id":595509,"avatar_url":"https://avatars.githubusercontent.com/u/595509?v=3","gravatar_id":"","url":"https://api.github.com/users/parmentf","html_url":"https://github.com/parmentf","followers_url":"https://api.github.com/users/parmentf/followers","following_url":"https://api.github.com/users/parmentf/following{/other_user}","gists_url":"https://api.github.com/users/parmentf/gists{/gist_id}","starred_url":"https://api.github.com/users/parmentf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/parmentf/subscriptions","organizations_url":"https://api.github.com/users/parmentf/orgs","repos_url":"https://api.github.com/users/parmentf/repos","events_url":"https://api.github.com/users/parmentf/events{/privacy}","received_events_url":"https://api.github.com/users/parmentf/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/madec-project/ezvis/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-20T12:34:06Z","updated_at":"2015-11-20T13:46:43Z","closed_at":"2015-11-20T13:46:43Z","body":"Ex: http://vimadec.intra.inist.fr:35284/chart.html?id=chart0\r\n![screenshot-vimadec intra inist fr 35284 2015-11-20 13-36-10](https://cloud.githubusercontent.com/assets/595509/11300003/c30be918-8f8b-11e5-9902-b851a83436f3.jpg)\r\n\r\nNote: this instance contains much data, and has been loaded via several CSV files *at the same time*, one file per year (that may be the reason why it did not happen on any other instance yet).\r\n\r\nThe query for the data, in this case do not use any ordering (due to [this condition](https://github.com/madec-project/ezvis/blob/ad9450d34a9700d7bcc1cea0c2f729126d790141/assets/js/dashboard.js#L143), saying only that any chart type different from histogram should order data on counting `value`).\r\n\r\nOne has to add an `else` block to order on the `_id` field (`asc`, and not `desc`), see [these lines in dashboard.js](https://github.com/madec-project/ezvis/blob/ad9450d34a9700d7bcc1cea0c2f729126d790141/assets/js/dashboard.js#L145-L146))"}}