Open IcToxi opened 2 years ago
Hi, I would also like to know is there any way to prevent the users from drawing lines in the canvas.
@IcToxi this looks great! Thanks so much for your contribution, in fact rather than a new app I'd suggest we use your app to replace dash-svm
.
One thing to note though, we've more or less stopped recommending dash_canvas
since most thing you can do there can also be accomplished with dcc.Graph
- and dcc.Graph
can do so much more. Per the dash canvas docs page:
Note: dash-canvas is a legacy package, the recommended way to annotate images is to use the drawing tools of plotly figures.
That said I'm not sure that the techniques described in https://dash.plotly.com/annotations are exactly what you'd want for this purpose... the super-cool point drawing feature you added would really be best handled not by drawing shapes, but by generic click events that cause a data point to be added to a trace. That in turn would be best done with "click anywhere" which is a feature we've been trying for some time to add to plotly.js but the PR to add it has stalled and needs some more work.
So maybe best to leave dash_canvas
here, and we can update to dcc.Graph
once we manage to finish up click anywhere. There might be a way to pretend we have this feature, by for example putting a heatmap or image on the graph and grabbing click events from the heatmap... if you're feeling really adventurous you could try that.
To your question about streambed
- don't worry about it, that's a private Plotly repo, those instructions were meant for Plotly employees and don't apply to you. We're just thrilled that you're contributing here!
cc @danton267 who's starting a project to update many of the apps in this repo - keep an eye on this PR, and leave dash-svm
off your list until this PR is merged 😄
Hi @alexcjohnson , Really appreciate the reply. I'm sorry I missed such a note. I was also thinking about whether canvas could do some interaction with other graphs, and then actually your team was already doing it. Awesome!
So, in fact, that annotation component can not only be used for photos, but actually any chart is within the possible range. Really looking forward to that click anywhere feature. I'm so excited to hear about these.
Thank you very much for taking the time to comment. BR
Hi there, I made an app and I think you may consider merging it into the project. Thx
I don't quite understand what this means.
This is a 2022 replica of dash-svm. I used dash's recent new components and new features, and I've added new page elements.
And I also want to add grids and axes to the canvas, as well as a one-click clear button. But dash-canvas is a totally new component and I can't find where to start. I'm trying to write some client side callbacks to implement these, but not much progress. It would be nice if someone could help enhance this app. Then I can also learn something new from it.
App pull request
About
Workflow
assets/
folder.The pre-review review
I have addressed all of the following questions:
Post PR (at merge time)
#patch
- An app has been updated or fixed#minor
- A new app has been added, or an app has been significantly reworked#major
- Breaking changes, make sure to discuss with dash-core before using this tag