This message was deleted.
# help
s
This message was deleted.
a
Hi Pavel! You're looking for a way to draw those dotted lines? Do you have a prototype you are working on that you can share? It's easier to offer help and suggestions if we can see your point of departure
p
Hi aaronkyle!
What I have at this point:
I need to draw this data in rectangles and draw to lines with html symbol
I can share code
a
Thank you, That would be helpful.
p
one minute
a
If you're working outside Observable and looking for a fast and easy way to add annotations, here's something that may help: https://d3-annotation.susielu.com/#examples
To recreate the exact formatting of your example GIF, you'd likely need to mix in some CSS 🙂
There are also some fun examples on Observable of notebooks with annotations, like this one: https://observablehq.com/@hydrosquall/d3-annotation-with-d3-line-chart
p
@aaronkyle thanks for links. I read them
a
The code you shared is an hml saved view of a pdf template this being generated from your local computer. The document also contains the SVG used to style the chart. At the bottom of the HTM page is some custom JS code, which I presume is what you're writing to generate this chart? The library that you are using is C3.js. There's also D3 and an additional D3 tooltip.
p
Yes, JS code generates chart. Also variable jsonTips contains json for annotations
a
Ok, so here's your code sorta "working" in Observable: https://observablehq.com/d/0486dbde041a066a
... Since you'll be developing this outside of Observable, I am not sure how far I can help. I only really know the world inside Observable 🙂. For me to start making sense of this, I would begin by working through the components so that I could 'detach' the chart generation from the HTML div (which I guess is not something you wish to do). Still, for your own purposes of D3.js learning and exploration, you might find it fun to play and prototype using Observable, as it can really speed up your iteration!
With respect to the placement of the annotations, this is beyond my current skill set. So I hope someone out there joins in the discussion or that you otherwise are excited and figure it out (and please share back if you do!)
Please be aware that in the notebook I just shared, the SVG may not draw into the HTML each time. For me, it works some of the time 🙂
p
@aaronkyle I was tried to figute this out last 2 days. But no luck 😞
a
Keep at it! I am sure you will figure it out. Maybe play in a notebook after looking at those references and share your progress?
Also - this might be a good question to ask in the D3 community Slack: https://d3js.slack.com/ (updated) There may be more folks there and also that community will be more adept with D3 in particular ❤️
p
How can I join this community? After clicking I see only error.
a
sorry, one moment, let me try again
p
Probably I need an invitation to join this channel
❤️ 1
Thank you very much @aaronkyle
❤️ 1
f