Skip to content
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

Documentation: "Data Structure" should be "Dataset Structure"? #3046

Closed
pniaps opened this issue Jul 28, 2016 · 2 comments
Closed

Documentation: "Data Structure" should be "Dataset Structure"? #3046

pniaps opened this issue Jul 28, 2016 · 2 comments

Comments

@pniaps
Copy link

pniaps commented Jul 28, 2016

Hi.
First, thank you very much for the great work.

The documentation seems confusing to me.
For example, line chart

var myLineChart = Chart.Line(ctx, {
    data: data,
    options: options
});

line chart data structure (http://www.chartjs.org/docs/#line-chart-data-structure) refers to an structure (dataset) that is within a datasets array of data field, but the title makes me think that this structure is chart data instead of each dataset of chart, so i think something like

var myLineChart = Chart.Line(ctx, {
    data: {
        label: "My First dataset",
        fill: false,
        lineTension: 0.1,
        backgroundColor: "rgba(75,192,192,0.4)",
        borderColor: "rgba(75,192,192,1)",
        borderCapStyle: 'butt',
        borderDash: [],
        borderDashOffset: 0.0,
        borderJoinStyle: 'miter',
        pointBorderColor: "rgba(75,192,192,1)",
        pointBackgroundColor: "#fff",
        pointBorderWidth: 1,
        pointHoverRadius: 5,
        pointHoverBackgroundColor: "rgba(75,192,192,1)",
        pointHoverBorderColor: "rgba(220,220,220,1)",
        pointHoverBorderWidth: 2,
        pointRadius: 1,
        pointHitRadius: 10,
        data: [65, 59, 80, 81, 56, 55, 40],
        spanGaps: 
    },
    options: options
});

until i see an example data object below.
I know this is specified in Chart Data (http://www.chartjs.org/docs/#chart-configuration-chart-data) but is more confusing at first look until you get used to this (many things with same name).

It would be better to change the title "Data Structure" to something like 'Dataset Structure"?

Thanks.

@etimberg
Copy link
Member

@pniaps I think that's a good recommendation. If you'd like to submit a PR to the markdown files that generate the docs, I'd be happy to merge it.

@pniaps
Copy link
Author

pniaps commented Aug 2, 2016

I'm sorry to be late.
Thank you so much guys.

exwm pushed a commit to exwm/Chart.js that referenced this issue Apr 30, 2021
exwm pushed a commit to exwm/Chart.js that referenced this issue Apr 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants