-
Notifications
You must be signed in to change notification settings - Fork 11.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The documentation is far from idiot-proof #7367
Comments
Have you seen the samples https://www.chartjs.org/samples/latest/ with full examples? |
This alone is always the most confusing part for me and I believe it simply arises from the way the information is presented. Most of my colleagues frequently ask whether something goes into Looking at https://www.chartjs.org/docs/latest/configuration/layout.html for example, the information is clearly there:
But most of the time, the eyes immediately skip to the table (one might even scroll down, completely hiding the first sentences) and only seeing: What happens next is usually confusion, followed by searching stack overflow for a code example 😄 The issue I see here is that the current documentation implicitly assumes that people read/study it top to button and that most things need to be told only once. What I however usually see is jumping straight into any page from a quick google search, quickly scanning for promising looking snippets/paragraphs that might answer the question somebody has and only focusing/reading these particular parts. Having all that said, my suggesting would be to write |
Not sure i'm an idiot (AMOF I dont think so) but found the "migration" link wrong in the readme : https://www.chartjs.org/docs/next/getting-started/v3-migration.html is 404 |
@JLuc what readme are you talking about? I don't see a link to the migration guide in https://raw.githubusercontent.com/chartjs/Chart.js/master/README.md |
Oups sorry it's in Breaking Changes of https://github.com/chartjs/Chart.js/releases/tag/v3.0.0-alpha |
@JLuc sorry about that. I've updated the link to point to the correct spot |
Thanks for this suggestion - it would be a big improvement over the current documentation. Even better if each of the breadcrumbs would link to the table that defines the other properties that object might need. I should add at this stage, taking another look at the documentation, I cannot find the page that defines the available properties of the Where is the documentation that describes |
I played around with the fully qualified names. The first image shows with Fully QualifiedPartially QualifiedRe the options page, I think that might be improved by removing that page from underneath "General" and renaming "Configuration" to "Options". That way everything underneath "Options" would be in the Chart options. We could move the documentation about global options, scriptable options, etc to the first page of what is now "Configuration". |
We would also need to think about how to display options that can go in multiple places. E.g. If you want a list of all options under This might be one good reason for us to adopt TypeScript more broadly. It could help a lot with these types of questions |
We actually document
I think that's the best way to handle options like that. It might be worth linking the dataset option to the corresponding config option page. That would reduce any duplicate info |
Going to close this; it's been a while since it was filed and we have continued to update the documentation since that point. We also now ship TS type definitions that common editors can pick up for autocomplete which will help the understanding of where options go. |
Documentation Is:
Please Explain in Detail...
Let's say you are completely new to ChartJS and want to build a line chart. After reading the installation and getting started pages, you might sensibly visit the Charts > Line page:
https://www.chartjs.org/docs/latest/charts/line.html
The example chart on the page looks great. How would you implement that in your own html page? Well look there is example code right underneath it.
Right... ok that's fine but what am I supposed to put in the
data
oroptions
fields? The next section is labeled "Dataset Properties". This seems relevant but I'm not really sure how it relates to thedata
field above. Right at the bottom of the page there is a heading called "Data Structure" which starts:Ok so you might think this is referring to the missing data field above and then you might try to do this:
But of course, even if you were to give a valid
options
value this would not work...Your Proposal for Changes
Please define the data types for the data and options fields. What properties do they accept? Where can I find this information? Please reference these datatypes in all the locations where they are needed such as the first example code of the Line documentation. Don't assume a newcomer has any knowledge besides what has been explained in the Getting Started pages.
If this is not possible to do then please supply more full examples. Why not give the full source for the line chart that is shown at the beginning of the line chart documentation?
This is just one example of a page that could be improved, however I find myself constantly lost while looking at the chartjs documentation. For example, looking at the "Performance" page I noticed a property called
ticks.sampleSize
. So thinking lowering this value might improve performance on my chart but I simply have no idea on which object this property exists. It seems likely to be on theticks
object of the common configuration of some axes object - however this is not explicitly stated neither is it stated how to specify the common axes properties.The text was updated successfully, but these errors were encountered: