question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Problem with data over 1000 ( Bar and Lines )

See original GitHub issue

When i have data over 1000 using Bar or Line it just does not show… up to 999 it show just fine, than more than this the chart is not rendered. ( only the bars/lines ) all the rest goes ok:

http://cl.ly/image/3x2x2K0h0Q3I

Example:

I am using my directive ( https://github.com/klederson/angular-chartjs-directive ) but doubt that is the problem

$scope.chart4 = {
      width : "100%",
      height : 400,
      options : {},
      data : {
        labels : global.positions.labels, //labels array obj
        datasets : [
        {
          fillColor : "rgba(247, 81, 64, 0.9)",
          strokeColor : "rgba(220,220,220,1)",
          pointColor : "rgba(220,220,220,1)",
          pointStrokeColor : "#fff",
          data : global.positions.data //data array object
        }
        ]
      }
    }

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
chrisbencommented, Aug 26, 2013

@klederson : I had the same problem as you but found the error was with my data: the array of values was containing strings instead of numbers. I suppose the code in the library that calculates the max value of all data (= the top y value of the scale) compares those strings directly without trying to do parseFloat on them. 999 > 1000 but ‘999’ > ‘1000’ !

Not really an issue with the library itself, but to avoid future user problems like this maybe it should console.log an alert when datasets contain strings instead of numbers.

2reactions
matthewdolmancommented, Mar 3, 2018

Just want to leave a comment here in case anyone arrives with the problem I have been having.

Modern values limit the size of the canvas element to 32,767px. If you have a large dataset and a large canvas then it is possible that this limit is stopping your chart from rendering.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Problem with data set over 1000 points - Highcharts
I can make multiple series (lines) and as long as each one is under 1000 points (even if the total number is greater...
Read more >
The issue with error bars - From data to Viz
Error bars give a general idea of how precise a measurement is, or conversely, how far from the reported value the true (error...
Read more >
Beyond Bar and Line Graphs: Time for a New Data ... - PLOS
Most papers presented continuous data in bar and line graphs. This is problematic, as many different data distributions can lead to the same...
Read more >
Broken column and bar charts - User Friendly - WordPress.com
The first thing we need to do is work out where the different groups of data lie. We have one group of data...
Read more >
11 Displaying Data | Introduction to Research Methods
We used a line chart to see if the variable we were graphing changed over time. ... With categorical or discrete data a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found