[
https://issues.apache.org/jira/browse/JSPWIKI-1102?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18040442#comment-18040442
]
Alex O'Ree commented on JSPWIKI-1102:
-------------------------------------
> -Since %%chartist would be a new behaviour that you add to JSPWiki, I'd
> suggest you add it to the Wiki.Behaviours.js file, which contains all
> behaviours. It probably also simplifies things, as you don't need the
> charity() helper call.
Is there a how to guide for behavior development or documentation on this? Or
even the jspwiki front end in general? The whole javascript setup in this
project is a quiet bit different than i've seen before. Taking a while to get
my footing on this one.
>-You have added additional CSS and JS links to the commonheader.jsp. This
>means that for every wiki page, these external files will be loaded (and may
>slow down the page reder time), even when never used!
True but the browser will cache it so the overhead is pretty minimal. Could
probably add the async flag for the javascript since it's typically not needed
right away
>-there are now hardcoded references to a specific version of the chartist
>library. (currently the latest) Probably it would be better to have those
>links configurable, and not hardcoded.
I understand the concern. It's either we copy and put chartist's dist content
within the ASF repo, CDN link it which I absolutely do not want to do for
multiple reasons, or use the webjar approach which is what this branch is
using. Webjars are pretty neat, it's an automated free cloud service that
monitors npm based open source github repos for releases, then builds it,
packages the output as a webjar and auto publishes to maven central. So at
least the dependency is managed somehow.... but unfortunately inside of the
webjar, they put the version number in the path name. This is not ideal but it
is what it is. Have any other options?
Googling this, it looks like there's a {{webjars-locator}} which might solve
this issue. I'll look into this next.
> BTW, a similar and very useful extension to JspWiki may be the Math Behaviour
> ! See [https://jspwiki-wiki.apache.org/Wiki.jsp?page=Math%20Behavior.]
Yup i saw that ticket and that wiki page too. It was next on the long list of
stuff i was going to attempt to hack together in the baseline.
> Add charting library to JSPWiki distribution
> --------------------------------------------
>
> Key: JSPWIKI-1102
> URL: https://issues.apache.org/jira/browse/JSPWIKI-1102
> Project: JSPWiki
> Issue Type: Improvement
> Components: Templates and UI
> Reporter: Dirk Frederickx
> Assignee: Alex O'Ree
> Priority: Minor
> Attachments: image-2025-11-23-14-07-13-571.png
>
>
> Add a charting library to JSPWiki for easy rendering data in TABLE's as line,
> pie- or bar-charts.
> The charting library should provide well chosen defaults to keep the extra
> markup as little as possible.
> Proposal:
> Include [https://gionkunz.github.io/chartist-js/] (MIT license) in the
> standard JSPWiki's distribution.
> * small footprint (10K zipped JS; only loaded in pages with require charts)
> * usage of svg; high quality device independent
> * highly customizable; but using 'convention over configuration' (great
> defaults)
> * responsive (great output on mobile devices)
>
> Prereq: https://issues.apache.org/jira/browse/JSPWIKI-1040
>
>
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)