Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
Tunnel Master
@tunnelmaster_gitlab
[discord] <Jonathan Hacklife πŸ› > In line 17, if you get a new data and the instance of the graphic already exists, you only modify the parameters of the graphic (Line 41).
https://cdn.discordapp.com/attachments/510060567298310146/886315315376558080/SPOILER_carbon.png
[discord] <Jonathan Hacklife πŸ› > Maybe that can work. In my case it has worked correctly and the instance is created only once.
[discord] <Nicd> thanks but I'm talking about Phoenix LiveView and ContEx here πŸ™‚
Tunnel Master
@tunnelmaster_gitlab
[discord] <Nicd> reimplemented it in chartjs, just needs: setting the language colours, grouping some of them as "Other", adding back flow data…
https://cdn.discordapp.com/attachments/510060567298310146/886331921766969445/Screenshot_2021-09-11_at_22.24.34.png
[discord] <Nicd> but dataset generation is done in Elixir now so the chart code is much cleaner
[discord] <Nicd> time for some Bioshock
[discord] <Nicd> also had to update chartjs to 3.5.1 so that breaks a bunch of stuff
Tunnel Master
@tunnelmaster_gitlab
[discord] <dbaer> @Nicd hmm, at work we use a library that takes json which i just output directly to the page with eex tags
[discord] <dbaer> would that be diffable?
Tunnel Master
@tunnelmaster_gitlab
[discord] <Nicd> that output I showed is diffable and is used to feed the chart now... well, sort of diffable
[discord] <Nicd> I think I would need to make stateful components out of it to get the best diffs
[discord] <Nicd> but it's good enough for now
Tunnel Master
@tunnelmaster_gitlab
[discord] <dbaer> @Nicd doesn't pragmatic studio have a section on graphing?
[discord] <Nicd> Is that a book?
[discord] <dbaer> and yeah theyve got one called charting which looks maybe like what you want
[discord] <Nicd> Lol $129
This message was deleted
[discord] <Nicd> Let's not do that
[discord] <dbaer> its just the video notes lol
[discord] <Nicd> Anyway I'll just use chartjs so I can progress
[discord] <dbaer> Β―_(ツ)_/Β―
[discord] <Nicd> Just need to fix the issues going from 2 to 3
[discord] <Nicd> Since the dataset comes directly from the backend, it works really nicely
[discord] <Nicd> Well chartjs is still shit but at least it's working right now
[discord] <dbaer> @Nicd half of that course is also free btw
[discord] <dbaer> i'm surprised you hadn't heard of it
Tunnel Master
@tunnelmaster_gitlab
[discord] <Nicd> I'm not really a course/book person
[discord] <dbaer> fair enough
[discord] <Nicd> Much to my shame I've had Elixir in Action for 2 or 3 years and haven't read a page
[discord] <dbaer> mmm. i've glanced at the Phoenix book like once. i think i bought it like 5 or 6 years ago now
[discord] <Nicd> I have another book also, both won from the forum for being a good boy. Haven't looked at that either. I should.
[discord] <Nicd> Thanks for the tips though
[discord] <dbaer> indeedly
Tunnel Master
@tunnelmaster_gitlab
[discord] <dbaer> i'm gonna have to go through all this myself converting my graphs to liveview eventually
[discord] <dbaer> it'll probably be my easiest liveview problem though hahahah
[discord] <dbaer> @Nicd i'm still converting my templates to heex
[discord] <Nicd> I left some as liveeex
[discord] <Nicd> Will maybe do them eventually or not
Tunnel Master
@tunnelmaster_gitlab
[discord] <dbaer> i probably should have done that, but its too late now. the first thing i did was a bash for loop to rename everything to heex and i'm well into conversion ;_;
[discord] <Nicd> Oh no
[discord] <Nicd> Good luck, imma sleep now
[discord] <dbaer> o/
Tunnel Master
@tunnelmaster_gitlab
[discord] <Nicd> and there it is, fixed for new chartjs version. it gets the correct languages from the backend
https://cdn.discordapp.com/attachments/510060567298310146/886651674414964756/Screenshot_2021-09-12_at_19.36.31.png
[discord] <Nicd> this also fixes the issue of having to deduce the correct latest day to show since we don't have the user's timezone on the backend
Tunnel Master
@tunnelmaster_gitlab
[discord] <Nicd> the right side axis is for the flow minutes, will add that data next
Tunnel Master
@tunnelmaster_gitlab
[discord] <Nicd> also need to sort the legend based on most XP and group those that overflow into "Others"
Tunnel Master
@tunnelmaster_gitlab
[discord] <Nicd> Nice, black screen of death. Time to end for tonight then :P
Tunnel Master
@tunnelmaster_gitlab
[discord] <> GayCookie.dev ❀🌈> Black? xD