Posts

Showing posts from March, 2025

Angular: Creating Dynamically Updating Chart with ng2-charts and chart.js with capacilities of Rxjs

I wrote an article on creating Real-Time Charts using SignalR and Blazor . After reading this article, some of my students were looking for the same chart in Angular, so I decided to write on this topic. In Angular, we can use JavaScript timer functions, e.g., setInterval(), to call the server side to fetch data and process it on the client side. But instead of using such a JavaScript function, we should use  RxJs  to handle time-based or time-bound operations. What is RxJs?   RxJS, or Reactive Extensions for JavaScript, is a library for composing asynchronous and event-based programs using observable sequences. RxJs provides a powerful and flexible way to handle data streams and asynchronous events that makes it easier and smarter to manage complex asynchronous tasks in JavaScript applications.      Following are some of the most important key features of RxJs: Observables: They represent data streams. These data steams can be observed and manipulate...