swimlane / ngx-charts

:bar_chart: Declarative Charting Framework for Angular
https://swimlane.github.io/ngx-charts/
MIT License
4.29k stars 1.15k forks source link

Request to add a new section inside documentation page for "real time" feature #339

Open corganfuzz opened 7 years ago

corganfuzz commented 7 years ago

I'm submitting a ... (check one with "x")

[ ] bug report => search github for a similar issue or PR before submitting
[x] feature request
[ ] support request => Please do not submit support request here

Current behavior

This is not really an issue, but more like a request inside the documentation part. One of the coolest features about ngx-charts is the "real time" feature that can ONLY be seen in the demo part and nowhere else.

Therefore, could we have a section on the documentation part that tell us how to implement "real time data", with lines of code and a brief explanation?. I think, as of right now, the only way to do it is to look at the github code inside the demo folder. All of the components there are inside app.component.ts which is a big file so it gets sort of confusing.

marjan-georgiev commented 7 years ago

I agree. Also, pull requests to the docs and demos are most welcome. If anyone is willing to contribute to the project, this is a great way to start.

corganfuzz commented 7 years ago

I could add it, if only I knew how to do it :)

kaikun213 commented 7 years ago

Would be great!

cole21771 commented 6 years ago

I would love for this to actually be added. Any update on the docs? I've been trying to get my application to render data in real time with ngx-charts for two straight days. Documentation sure would help

trumbitta commented 6 years ago

@corganfuzz how do you setup "real time"?

cole21771 commented 6 years ago

@trumbitta not sure if you've figured out your problem yet, but your results array that you're feeding to the ngx-charts whatever needs to be immutable or something like that. Anyway, if when you want to update the graph with new data, after you have added the data to the results array, just do this.results = [...this.results]. This will expand the results array (with the ...), and then put it back into another array, essentially creating a new array with the same data, however this time, ngx-charts will notice, and it will update the display.

Edit: Link to where I originally got ^ answer https://github.com/swimlane/ngx-charts/issues/118#issuecomment-266767623