I found a great example, big thanks to Daniel, link below:
link
I also asked on the website, but I also decided to ask here.
I have a few questions:
-
I need to retrieve data from the database. The data should be refreshed every 1 second. I know that I need to override my SendVariationData() function for the function that fetches the data from the database. Perhaps we can inject some sort of service that allows the data to be read from the database.
-
I need to create multiple charts and I know I can use one hub (connection) to subscribe to multiple streams.
-
I want to create multiple line charts to display the months data, so i need 12 charts (one chart for one month).
I don’t want to create 12 ‘Writers’ (like ‘_currencyWriters’), maybe it would be better to pass the month parameter (maybe other parameters), and maybe we need a Dictionary<string, List list?
And also I need to create another chart, for example a bar chart, and pass the parameters needed by the function that provides the data from the database and shows on the chart. -
In this situation, can I use only one (maybe static) Hub Connection or maybe create separate connection for each charts?
I don’t know exactly how to extend solution. Maybe my way is wrong. Could you please give me some advices and tips.
I’m working on the problem to extend the examples, but I failed, I’m new to .net core and balazor and signalr.
user24835027 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.