{"action":"created","issue":{"url":"https://api.github.com/repos/amcharts/amcharts4/issues/745","repository_url":"https://api.github.com/repos/amcharts/amcharts4","labels_url":"https://api.github.com/repos/amcharts/amcharts4/issues/745/labels{/name}","comments_url":"https://api.github.com/repos/amcharts/amcharts4/issues/745/comments","events_url":"https://api.github.com/repos/amcharts/amcharts4/issues/745/events","html_url":"https://github.com/amcharts/amcharts4/issues/745","id":394656196,"node_id":"MDU6SXNzdWUzOTQ2NTYxOTY=","number":745,"title":"XYChart live demo date axis label opacity issue","user":{"login":"Achilles1515","id":23387905,"node_id":"MDQ6VXNlcjIzMzg3OTA1","avatar_url":"https://avatars3.githubusercontent.com/u/23387905?v=4","gravatar_id":"","url":"https://api.github.com/users/Achilles1515","html_url":"https://github.com/Achilles1515","followers_url":"https://api.github.com/users/Achilles1515/followers","following_url":"https://api.github.com/users/Achilles1515/following{/other_user}","gists_url":"https://api.github.com/users/Achilles1515/gists{/gist_id}","starred_url":"https://api.github.com/users/Achilles1515/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Achilles1515/subscriptions","organizations_url":"https://api.github.com/users/Achilles1515/orgs","repos_url":"https://api.github.com/users/Achilles1515/repos","events_url":"https://api.github.com/users/Achilles1515/events{/privacy}","received_events_url":"https://api.github.com/users/Achilles1515/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-12-28T15:07:07Z","updated_at":"2019-01-03T12:18:07Z","closed_at":null,"author_association":"NONE","body":"Regarding the [live data demo](https://www.amcharts.com/demos/live-data/), where chart data is both added and removed once per second.\r\n\r\nIf you sit and watch the demo for a minute or two, you will notice some odd behavior of the x-axis label opacity and can eventually see something like this:\r\n\r\n![untitled2](https://user-images.githubusercontent.com/23387905/50518953-85e84d00-0a86-11e9-812d-2a46e51b06c7.png)\r\n\r\nCorrect me if I am wrong, but I am pretty certain the demo is intended to ALWAYS have the opacity go from lowest (left) to highest (right), and not have weird breaks like the screenshot above.\r\n\r\nLabel opacity is being set in the demo in the\r\n`dateAxis.events.on(\"datarangechanged\", ...)` method.\r\n\r\nI edited the demo to log how much time has elapsed between these `datarangechanged` events and the results are quite erratic:\r\n\r\n![untitled](https://user-images.githubusercontent.com/23387905/50519103-52f28900-0a87-11e9-9aaf-a7d6c36a2b17.png)\r\n\r\n...where large time differences become the cause for the opacity issue in the screenshot of the demo above.\r\n\r\nIs there a different dateAxis event that the opacity logic should be hooked into? I guess I'm confused by the amCharts documentation of the `datarangechanged `event:\r\n\r\n> datarangechanged: Invoked when range of the currently selected data is validated.\r\n\r\nWhy is the `datarangechanged `event not getting executed every time a datapoint is added/removed from the series? What triggers a \"range\" validation and why are the timing results from above so erratic even though data is added/removed on a consistent basis with new data always having new date values?"},"comment":{"url":"https://api.github.com/repos/amcharts/amcharts4/issues/comments/451127747","html_url":"https://github.com/amcharts/amcharts4/issues/745#issuecomment-451127747","issue_url":"https://api.github.com/repos/amcharts/amcharts4/issues/745","id":451127747,"node_id":"MDEyOklzc3VlQ29tbWVudDQ1MTEyNzc0Nw==","user":{"login":"zeroin","id":5336255,"node_id":"MDQ6VXNlcjUzMzYyNTU=","avatar_url":"https://avatars2.githubusercontent.com/u/5336255?v=4","gravatar_id":"","url":"https://api.github.com/users/zeroin","html_url":"https://github.com/zeroin","followers_url":"https://api.github.com/users/zeroin/followers","following_url":"https://api.github.com/users/zeroin/following{/other_user}","gists_url":"https://api.github.com/users/zeroin/gists{/gist_id}","starred_url":"https://api.github.com/users/zeroin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zeroin/subscriptions","organizations_url":"https://api.github.com/users/zeroin/orgs","repos_url":"https://api.github.com/users/zeroin/repos","events_url":"https://api.github.com/users/zeroin/events{/privacy}","received_events_url":"https://api.github.com/users/zeroin/received_events","type":"User","site_admin":false},"created_at":"2019-01-03T12:18:07Z","updated_at":"2019-01-03T12:18:07Z","author_association":"COLLABORATOR","body":"Thanks for the heads up, we indeed changed how `datarangechanged` event to save cpu and now it is not fired as often as it used to be. So in this case it would be safest to use `validated` event. And it would be really complicated to answer the question about `datarangechanged` event, theoretically range should not change at all on this particular example, as it fires only when startIndex/endIndex change, but because of some rounding it is still fired. So I would not suggest to use it at all here. We will update our demos as well."}}
{"actor":{"display_login":"zeroin"}}