tomazbracic
Dashboard app with charts - will using many js hooks be an issue? How to add vertical lines on cursor?
Hi,
I will start building charts heavy dashboard. (Something similar to Grafana
). Idea is to use JS based charting library - Chart.js or Highcharts.js.
Data will be coming into the system in real time. I already did a pilot. Once data comes in I store it in TimescaleDB and at the same time I pushed it to Phoenix pub/sub. Then I use it in Liveview where I subscribe to pubsub in mount function.
1.) Using so many js hooks on a page - would that be an issue? Would you suggest other approach?
2.) One of the critical things which I haven’t yet figured it out is - imagine I have like 10 timeseries charts on the screen. How could I create a vertical line (where my mouse cursor is) … and based on that time on chart all the charts on the screen should have a vertical line at that time. I assume this is a JS area, but connecting all this over so many components (JS Hooks, JS, Phoenix sockets, Liveview)… not sure how to approach this.
So what I would like to ask is if anybody write your own opinion on this. Any suggestions? Is there any other library that you would suggest instead of two mentioned above and why?
I appreciate your feedback. Thank you all.
Tomaz
Most Liked
tomazbracic
We are using client-side charting library Chart.js. This decision comes with a bit of a legacy. We had another project where the front end was at the time developed with React.js. We didn’t want to use a dedicated charting library for elixir projects and then another one for React-based. Each takes a bit of a “how to” learning and adopting. So we wanted to minimize this.
My idea was to get more feedback on this approach from others if hands-on experience is even better.
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance









