Stephanevg / PSHTML

Cross platform Powershell module to generate HTML markup language
https://pshtml.readthedocs.io/en/latest/
Other
168 stars 43 forks source link

Consider adding Chartjs as asset #165

Closed Stephanevg closed 5 years ago

Stephanevg commented 5 years ago

This issue has a dependency on the Configuration refactoring (Especially the Asset Factory).


Please also have a look at #164 for bootstrap integration as it identical in nature, just another framework.

Concrete implementation and Access will be done via the 'Configuration' system of PSHTML, which is tracked here --> https://github.com/Stephanevg/PSHTML/issues/153

I want to open the discussion on adding Chartjs as asset directly in PSHTML. The main reason I would like to add it directly, is to support cases where there is no internet connection, which will have as a consequence, that charting won't work when there is no internet connection.

I would see the implemetnation as follow: 1) Add only the necessary files Chart.min.js 2) in Folder PSHTML/Assets/ create a subfolder 'Charts' 3) Add a function to give the user the ability to easily add a link to the local Chart version. Perhaps something like 'Set-PSHTMLAsset' or so?

Stephanevg commented 5 years ago

Implemented as described as above, except Set-PSHTMLAsset I choose to use Write-PSHTMLAsset. Added in #https://github.com/Stephanevg/PSHTML/commit/14aebd0f10ab1a498c2ac7fb66403e81aedd85e6