jbkunst / highcharter

R wrapper for highcharts
http://jkunst.com/highcharter/
Other
720 stars 148 forks source link

Adding highchart themes through `hc_add_dependencies()` or similar? (FR/offer to do) #734

Closed batpigandme closed 1 year ago

batpigandme commented 2 years ago

Hi Joshua,

As always, huge fan of highcharter.

I've been working on recreating some of the Highcharts accessibility examples from their docs (here), and those mentioned in a couple of issues re. the accessibility module working in this package (it does, at least in part).

Summary point: I was going to work on a PR to add the "HighContrast" themes from highcharts over as `hctheme()` functions (in the HC library as TypeScript, and regular JS files), but noticed that in their examples, they actually source the themes as JavaScript, e.g. at the top of the first example:

...
<script src="https://code.highcharts.com/modules/accessibility.js"></script>
<script src="https://code.highcharts.com/themes/high-contrast-light.js"></script>
...

I thought I might get lucky and tried hc_add_dependency(name = "themes/high-contrast-light.js"), which failed (duh), since you actually include the plugin scripts themselves in htmlwidgets/lib/highcharts/plugins.

Would it be of interest for me to do a helper that allowed these themes to be added to an hc object in a manner similar to the plugins?

(Apologies if this demonstrates my dearth of knowledge when it comes to TypeScript/JavaScript…it knows no bounds).

Thanks!

Mara

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Feel free to reopen it if you find it necessary.