Chart.js icon indicating copy to clipboard operation
Chart.js copied to clipboard

Link to documentation in samples

Open linkviii opened this issue 2 years ago • 8 comments

Documentation Is:

  • [X] Missing or needed?
  • [ ] Confusing
  • [ ] Not sure?

Please Explain in Detail...

It would be useful if every sample had links to relevant documentation.

I'd be willing to contribute a first draft for every sample if you decide this is a good idea. Just need to know what the template would be before changing a bunch of files. [Put docs section at the top or at the bottom?]

Your Proposal for Changes

I'd expect https://www.chartjs.org/docs/latest/samples/line/stepped.html to display something like

Docs

And for https://www.chartjs.org/docs/latest/samples/scales/time-max-span.html :

Docs

Example

No response

linkviii avatar Apr 13 '22 01:04 linkviii

@kurkle @LeeLenaleee how do you feel about this?

etimberg avatar Apr 15 '22 22:04 etimberg

Sounds good to me.

kurkle avatar Apr 15 '22 22:04 kurkle

@linkviii if you're still up for putting up a first draft, we'd love to look at it

etimberg avatar Apr 15 '22 22:04 etimberg

I guess all links should be file relative like this: ../../axes/cartesian/time.html?

Just throw them at the bottom of the file like this?

image

linkviii avatar Apr 16 '22 00:04 linkviii

I think at the bottom is fine. Relative links are better since they'll keep updating as new versions are published

etimberg avatar Apr 16 '22 00:04 etimberg

Huh, this is kinda a lot of work lol. Anyway my progress so far is here: https://github.com/linkviii/Chart.js/tree/document-samples

linkviii avatar Apr 16 '22 20:04 linkviii

@LeeLenaleee Since the PR was merged, should we close this issue?

igorlukanin avatar May 30 '22 16:05 igorlukanin

Don't think so, while it was a good start as I commented there I think there is a a lot to improve on still so guess it's best to leave this open so if people want to extend on it they can find it more easily

LeeLenaleee avatar May 30 '22 16:05 LeeLenaleee