how to display large number of data points












0















I have a water monitoring system, which reports tank level and usage values every minute. I have a mobile app that displays the data, but I want to surface the info on a general web page so the people in the house will see it..



but, a 3 day view is over 4000 data points.. level data range values are from 1750 to 2029 (and I see those on the y axis as top and bottom)



right now I get a straight line (from start of array to end) for both usage and level data items..



            var myChart = new Chart(canvas, {
type: 'line',
showLine: true,
data: {
datasets: [
{
xAxisID: 'dates',
data: self.data[self.config.Pins[1]],
fill:true,
borderColor: '#2196f3', // Add custom color border (Line)
backgroundColor: '#2196f3',
//borderWidth: 1,// Specify bar
}
]
},
options: {
legend: { display: false, },
responsive: true,
elements: {
line: {
tension: 0, // disables bezier curves
}
},
scales: {
xAxes: [{
id: 'dates',
type: 'time',
distribution: 'linear',
scaleLabel: {
display: true,
labelString: 'Water Usage, gallons'
},
time: {
unit: 'minute'
},
bounds: 'data',
ticks: {
display: false ,
maxRotation: 90,
source: 'data',
maxTicksLimit: self.data[self.config.Pins[1]].length, },
}],
yAxes: [{
display: true,
scaleLabel: {
display: true,
labelString: 'used'
},
ticks: {
beginAtZero: true,
source: 'data',
min: 0,
//max: self.data[self.config.Pins[1]].length,
},
}]
},
}
});


any guidance welcomed



the x and y axis are displayed with the right labels,
the Y axis has the right number scale from the data
the chart shows the MAX value of the Y axis in the upper left (411.0000)
on the right, same height, is a dot, which displays date/time.
the right edge of the graph, also shows different date/time values...
as if the top edge is drawn on the right...



but the right edge is a STACK of all the values, low to high, where their timestamps are ignored.. all drawn on the right edge.. as if step drew the 1st point in the left edge, then the next point on the right edge, and then there was no more room, so kept drawing points at the rightmost edge.










share|improve this question

























  • sorry, as NOT a straight line.. follow the actual data, jagged line (then I will fill later)

    – Sam
    Jan 20 at 15:23
















0















I have a water monitoring system, which reports tank level and usage values every minute. I have a mobile app that displays the data, but I want to surface the info on a general web page so the people in the house will see it..



but, a 3 day view is over 4000 data points.. level data range values are from 1750 to 2029 (and I see those on the y axis as top and bottom)



right now I get a straight line (from start of array to end) for both usage and level data items..



            var myChart = new Chart(canvas, {
type: 'line',
showLine: true,
data: {
datasets: [
{
xAxisID: 'dates',
data: self.data[self.config.Pins[1]],
fill:true,
borderColor: '#2196f3', // Add custom color border (Line)
backgroundColor: '#2196f3',
//borderWidth: 1,// Specify bar
}
]
},
options: {
legend: { display: false, },
responsive: true,
elements: {
line: {
tension: 0, // disables bezier curves
}
},
scales: {
xAxes: [{
id: 'dates',
type: 'time',
distribution: 'linear',
scaleLabel: {
display: true,
labelString: 'Water Usage, gallons'
},
time: {
unit: 'minute'
},
bounds: 'data',
ticks: {
display: false ,
maxRotation: 90,
source: 'data',
maxTicksLimit: self.data[self.config.Pins[1]].length, },
}],
yAxes: [{
display: true,
scaleLabel: {
display: true,
labelString: 'used'
},
ticks: {
beginAtZero: true,
source: 'data',
min: 0,
//max: self.data[self.config.Pins[1]].length,
},
}]
},
}
});


any guidance welcomed



the x and y axis are displayed with the right labels,
the Y axis has the right number scale from the data
the chart shows the MAX value of the Y axis in the upper left (411.0000)
on the right, same height, is a dot, which displays date/time.
the right edge of the graph, also shows different date/time values...
as if the top edge is drawn on the right...



but the right edge is a STACK of all the values, low to high, where their timestamps are ignored.. all drawn on the right edge.. as if step drew the 1st point in the left edge, then the next point on the right edge, and then there was no more room, so kept drawing points at the rightmost edge.










share|improve this question

























  • sorry, as NOT a straight line.. follow the actual data, jagged line (then I will fill later)

    – Sam
    Jan 20 at 15:23














0












0








0








I have a water monitoring system, which reports tank level and usage values every minute. I have a mobile app that displays the data, but I want to surface the info on a general web page so the people in the house will see it..



but, a 3 day view is over 4000 data points.. level data range values are from 1750 to 2029 (and I see those on the y axis as top and bottom)



right now I get a straight line (from start of array to end) for both usage and level data items..



            var myChart = new Chart(canvas, {
type: 'line',
showLine: true,
data: {
datasets: [
{
xAxisID: 'dates',
data: self.data[self.config.Pins[1]],
fill:true,
borderColor: '#2196f3', // Add custom color border (Line)
backgroundColor: '#2196f3',
//borderWidth: 1,// Specify bar
}
]
},
options: {
legend: { display: false, },
responsive: true,
elements: {
line: {
tension: 0, // disables bezier curves
}
},
scales: {
xAxes: [{
id: 'dates',
type: 'time',
distribution: 'linear',
scaleLabel: {
display: true,
labelString: 'Water Usage, gallons'
},
time: {
unit: 'minute'
},
bounds: 'data',
ticks: {
display: false ,
maxRotation: 90,
source: 'data',
maxTicksLimit: self.data[self.config.Pins[1]].length, },
}],
yAxes: [{
display: true,
scaleLabel: {
display: true,
labelString: 'used'
},
ticks: {
beginAtZero: true,
source: 'data',
min: 0,
//max: self.data[self.config.Pins[1]].length,
},
}]
},
}
});


any guidance welcomed



the x and y axis are displayed with the right labels,
the Y axis has the right number scale from the data
the chart shows the MAX value of the Y axis in the upper left (411.0000)
on the right, same height, is a dot, which displays date/time.
the right edge of the graph, also shows different date/time values...
as if the top edge is drawn on the right...



but the right edge is a STACK of all the values, low to high, where their timestamps are ignored.. all drawn on the right edge.. as if step drew the 1st point in the left edge, then the next point on the right edge, and then there was no more room, so kept drawing points at the rightmost edge.










share|improve this question
















I have a water monitoring system, which reports tank level and usage values every minute. I have a mobile app that displays the data, but I want to surface the info on a general web page so the people in the house will see it..



but, a 3 day view is over 4000 data points.. level data range values are from 1750 to 2029 (and I see those on the y axis as top and bottom)



right now I get a straight line (from start of array to end) for both usage and level data items..



            var myChart = new Chart(canvas, {
type: 'line',
showLine: true,
data: {
datasets: [
{
xAxisID: 'dates',
data: self.data[self.config.Pins[1]],
fill:true,
borderColor: '#2196f3', // Add custom color border (Line)
backgroundColor: '#2196f3',
//borderWidth: 1,// Specify bar
}
]
},
options: {
legend: { display: false, },
responsive: true,
elements: {
line: {
tension: 0, // disables bezier curves
}
},
scales: {
xAxes: [{
id: 'dates',
type: 'time',
distribution: 'linear',
scaleLabel: {
display: true,
labelString: 'Water Usage, gallons'
},
time: {
unit: 'minute'
},
bounds: 'data',
ticks: {
display: false ,
maxRotation: 90,
source: 'data',
maxTicksLimit: self.data[self.config.Pins[1]].length, },
}],
yAxes: [{
display: true,
scaleLabel: {
display: true,
labelString: 'used'
},
ticks: {
beginAtZero: true,
source: 'data',
min: 0,
//max: self.data[self.config.Pins[1]].length,
},
}]
},
}
});


any guidance welcomed



the x and y axis are displayed with the right labels,
the Y axis has the right number scale from the data
the chart shows the MAX value of the Y axis in the upper left (411.0000)
on the right, same height, is a dot, which displays date/time.
the right edge of the graph, also shows different date/time values...
as if the top edge is drawn on the right...



but the right edge is a STACK of all the values, low to high, where their timestamps are ignored.. all drawn on the right edge.. as if step drew the 1st point in the left edge, then the next point on the right edge, and then there was no more room, so kept drawing points at the rightmost edge.







time chart.js






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 22 at 14:15







Sam

















asked Jan 20 at 15:13









SamSam

2617




2617













  • sorry, as NOT a straight line.. follow the actual data, jagged line (then I will fill later)

    – Sam
    Jan 20 at 15:23



















  • sorry, as NOT a straight line.. follow the actual data, jagged line (then I will fill later)

    – Sam
    Jan 20 at 15:23

















sorry, as NOT a straight line.. follow the actual data, jagged line (then I will fill later)

– Sam
Jan 20 at 15:23





sorry, as NOT a straight line.. follow the actual data, jagged line (then I will fill later)

– Sam
Jan 20 at 15:23












1 Answer
1






active

oldest

votes


















0














this turned out to be a data bug.. one element in the array was not Time Cartesian (date & value), just a point(value)... charting got confused as to what to do...






share|improve this answer























    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54277840%2fhow-to-display-large-number-of-data-points%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    this turned out to be a data bug.. one element in the array was not Time Cartesian (date & value), just a point(value)... charting got confused as to what to do...






    share|improve this answer




























      0














      this turned out to be a data bug.. one element in the array was not Time Cartesian (date & value), just a point(value)... charting got confused as to what to do...






      share|improve this answer


























        0












        0








        0







        this turned out to be a data bug.. one element in the array was not Time Cartesian (date & value), just a point(value)... charting got confused as to what to do...






        share|improve this answer













        this turned out to be a data bug.. one element in the array was not Time Cartesian (date & value), just a point(value)... charting got confused as to what to do...







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jan 22 at 14:14









        SamSam

        2617




        2617
































            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54277840%2fhow-to-display-large-number-of-data-points%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Homophylophilia

            Updating UILabel text programmatically using a function

            Cloud Functions - OpenCV Videocapture Read method fails for larger files from cloud storage