Skip to content

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

@pniaps

Description

@pniaps

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions