Use `canvas` for bar charts instead of `div`?
I 'm having a go at creating charts and wondering if it 's possible to do that using canvas without custom actions instead of div ? I can do the initial selection of the canvas by getting element by id but then I need to do const ctx = canvas.getContext("2d"); and I 'd like to know if it 's possible . I know I could use something like chartjs as a package , etc . , but looking to see what I cn do in toddle just using the [Canvas API ] ( https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API ) . I don 't think it is possible without custom code , no . You could get quite far with just a few custom actions , and you would still be able to preview changes in the editor etc . It 's just that Canvas specific functionality is not currently exposed by toddle , perhaps one day . For charts I expect you can get really far with SVGs , and likely get a better result in terms of looks and performance . You can make entirely dynamic SVGs without custom code . Yes , it uses SVGs only . I think it use one custom code formula to get the width of the parent , but I could just have hard -coded that value I guess 🤔 I think charts is a perfect use -case for SVGs really . Most chart libraries I checked out rely mostly on SVG and rarely on canvas .
.jpeg/public)