Is Highcharts experiencing issues when there are over 999 items in the series data?

Check out my demonstration on JSFiddle. I incorporated some of the techniques mentioned in Nick's response to this particular question.

However, when applying these methods to my own data model, nothing seemed to be happening. After a thorough debug session, I discovered that the following code snippet was causing the issue:

var maxItems = 1000;
var chartData = new Array(maxItems);
for (var i = 0; i <= maxItems; i++) {
    chartData[i] = { y: 3, x: 1380385867013, myData:'hello' };
}

Surprisingly, Highcharts failed to display anything with this setup. Strangely enough, reducing the value of maxItems to 999 resolved the problem.

An alternative approach:

chartData[i] = [ 1380385867013, 3 ];

This configuration allowed me to add as many items as needed, but I require the "myData" option for tooltip functionality. What steps should I take next?

Answer №1

Upon running the jsfiddle example and checking the console log, the following is displayed:

Highcharts error #12: www.highcharts.com/errors/12

The content from the provided link is detailed as follows:

Highcharts Error #12

Highcharts expects point configuration to be numbers or arrays in turbo mode

If the series.data option includes object configurations and the number of points exceeds the turboThreshold, this error will occur. To resolve it, either adjust the turboThreshold value or update your point configurations to numbers or arrays. Refer to turboThreshold for more information.

Review Highcharts documentation on turboThreshold:

turboThreshold: Number

In cases where a data array within a series surpasses this threshold, only one dimensional arrays of numbers, or two dimensional arrays with x and y values are permitted. Additionally, only the first point is validated, assuming the rest maintain the same format. This optimization avoids costly data checks and indexing in lengthy series. Setting it to 0 disables this feature, defaulting to 1000.

Hence, users Mark and strikers were correct.

Answer №2

To adjust the turboThreshold to 0 in the plotOptions under the series option, simply follow this setup:

plotOptions: {
    series: {
        turboThreshold: 0
    }
}

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Automated error checking using Javascript, HTML, and PHP

I'm new to HTML and looking for a way to implement instant error checking on forms. For example, I want an error message to display if a user enters a username that is less than 5 characters or more than 15 characters. The error should disappear once ...

Expand and collapse dynamically while scrolling

// Closing Button for Main Navigation $('button#collapse-button').click(function () { $('nav#main-nav').toggleClass('closed'); }); $(window).on('scroll', function () { if ($(wind ...

Interested in leveraging string functions on the information retrieved from the API?

I am trying to utilize String functions such as slice(x,y), length() on the data received from the API. To achieve this, I first converted the data to a variable called mystr using JSON.stringify(obj), but encountered an issue where the console displayed: ...

Transcluding an element into an ng-repeat template in AngularJS: How can it be done?

Incorporating a carousel directive involves chunking the passed in array of items and mapping it into an array of arrays of elements. This structure then generates markup resembling the pseudo code provided below: <array of arrays> <array of i ...

Effective Ways to Redirect During or After Executing the onClick Function of Button

I am currently working on implementing a feature for my Next.js website. The functionality involves allowing users to create a new group by clicking a button, and then being redirected to an "Invite members" page with the auto-generated group_id included i ...

Can a web application access USB devices across different browsers and operating systems?

I am curious about how we can achieve this particular task. I have heard various things about Silverlight 4, JavaScript, or ActiveX control, but I have yet to see a demonstration of code for any of them. Is there a web component available for this, or is ...

What's the best way to showcase information from a document on the screen?

Every time I visit the '/gallery' route, the data from the 'posts.json' file is retrieved. By utilizing the 'fs' module and the read() method, the data is read from the file and stored in the this.pictures array. However, upon ...

Implementing ordering and limiting of elements in NestJS TypeORM relations

I am new to typeorm and relationships. I am currently facing some challenges and feeling a bit confused. I have a question regarding sorting relations in typeorm by id or createdDate without explicitly mapping them and limiting the number of elements. Here ...

What is the best way to invoke an API two times, passing different parameters each time, and then merge both responses into a single JSON object using a callback function?

This code snippet is currently functional, but it only retrieves the JSON response for the first set of parameters. I am looking to make multiple calls to an external API with different parameters and then combine all the responses into one concatenated J ...

Is there a way to retrieve the value of an element by clicking on its corresponding button using MUI framework?

I am working on a dashboard feature where I need to update the status by clicking on it. However, I am facing an issue with changing the state value upon clicking. Here is my component: <MenuItem> <Button fullWidt ...

Creating a repository of essential functions in AngularJSDiscover the steps to set up a

I am looking to create a set of reusable functions in AngularJS for CRUD operations that can be used across multiple entities in my project. I have already set up a factory using $resource for server communication, which looks like this: Model File: var ...

choose among various options in Javascript

I'm currently using PHP and AJAX to create a basic CRUD system. I want to display a form with three buttons: Grabar, Modificar, and Eliminar. The issue I'm facing is determining the action to take based on which button is clicked. For instance, c ...

Retrieve the screen dimensions, including the source code panel and debug panel, utilizing jQuery

$(window).height(); $(window).width(); I am currently utilizing these JavaScript codes to obtain the screen size. However, I have noticed that when the source code panel/debug panel is open, it affects the accuracy of the screen size results. Is there a w ...

Using the Trigger Method in a Vue JS Component with Sibling Components

Seeking assistance once again for a VueJS2 project. Currently, I have a setup with a parent component, along with child1 and child2. The scenario is that the form in child1 needs to receive data from child2, which acts as a table. When a checkbox on a row ...

Cordova plugin for Ionic has not been defined

I am facing a challenge in my Ionic app. The issue arises when the cordova.js file containing a crucial plugin does not initialize until after the controllers.js script has been downloaded and executed. As a result, attempts to use the plugin in the contro ...

Challenges with date formatting arise for Spanish speakers when the date returns as NaN or an Invalid

I have been working on an Angular app Objective: My aim is to allow users to input dates in Spanish format (DD/MM/YYYY) and display them as such, while converting them back to English format when saving the data to the Database. Issue: One problem I enco ...

Leveraging the useEffect hook in conjunction with the "async" keyword

Looking for a way to clean up react request in react hooks. I've heard about using AbortController in my hook, but I'm not sure how to implement it. I am currently working with next.js. What are some effective approaches to solve this issue? Also ...

Having trouble loading an image from an external website onto the page

I'm currently utilizing an API to retrieve an image and attempting to display it on my webpage. Although the API source works, the image is not appearing when displayed on the page. <img class="avi" src="' + data.data[0].musicbrainz_image_url ...

Transmit information from Ajax to CodeIgniter's controller

Right now, I am facing an issue with sending data from my JavaScript to a function in the controller using AJAX. Despite my best efforts, AJAX is not sending the data. Below, you can find the code that I have been working on: The JavaScript Function var ...

What is the best way to trigger the jQuery-File-Upload event within this function?

Before uploading a file, I want to check the API first. $('.file_upload_button_wrapper').on('click', function () { // perform check here $.ajax({ url: '/?app=files&getfile=ajax%2Fupload.php', ...