Utilize Highcharts to showcase time-related data in tooltips

I have a chart that displays time data on both the X and Y axes. While I am able to convert my millisecond data into HH:MM:SS for the X axis, I'm struggling to get the Y axis tooltip to also show in this format. The API suggests it's achievable, but I haven't been successful in replicating it.

tooltipValueFormat: String

Specifically for parallel coordinates. This format will be used for point.y and will appear in tooltip.pointFormat as point.formattedValue. If not specified, other options will be applied in the following order:

  1. The format set in yAxis.labels will be used if available
  2. If the yAxis is a category, the category name will be displayed
  3. If the yAxis is a datetime type, the value will use the same format as the yAxis labels

https://api.highcharts.com/highstock/yAxis.tooltipValueFormat

Take a look at my example in this fiddle: https://jsfiddle.net/gramlich/jpnsujo8/1/

To add more complexity, I am implementing this within a Django View and passing the chart options via JSON to limit the need for JavaScript. If possible, I prefer a solution using only objects from the Highcharts API without having to create my own Formatter function in JS.

Thank you for any assistance!

Answer №1

To format data points, you can utilize the pointFormat feature by providing a formatting string like this:

tooltip: {
    pointFormat: '{point.y:%M:%S}'
}

For a demonstration, check out this live example: https://jsfiddle.net/w4f9suzb/

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

Tips for aligning a rotated element with the right edge

My current challenge involves aligning an absolute element (an image) to the right edge of its container. Under normal circumstances, this alignment works seamlessly. However, when a transformation is applied, calculating the correct left property becomes ...

Sorting an array of files with date and time formatting: Essential tips

I have retrieved an array of files with filenames in DateTime format. Can someone please guide me on how to sort the "fetchArray" and display it as the "expectedArray" shown below? const fetchArray = [ "root/home/desktop/usr/public/image ...

Delays in State Transitions with Angular UI-Router's Nested Views

Currently, I am facing an issue with my parent view that contains a nested view in the middle. Whenever there is a state change, the nested view seems to lag behind for a moment before loading the next state. It's like the nested view is taking a whi ...

Guide on integrating jQuery-Plugin into WordPress

I've been attempting to integrate the jquery.contenthover.js Plugin into my WordPress site, but I'm encountering some difficulties. Initially, I removed the jQuery version loaded by WordPress because the plugin requires a higher version. I then ...

Tips for Concealing All Characters Except One in a Password Field

I have been researching this particular question extensively, but I have yet to come across a definitive solution. What I am looking to achieve is displaying a user's password on their account page with all characters hidden except for the first lette ...

Collaborating and passing on a MongoDB connection to different JavaScript files

I am currently working with Node.js/Express.js/Monk.js and attempting to share my MongoDB connection across multiple JS files. Within apps.js, I have set up the following: var mongo = require('mongodb'); var monk = require('monk'); va ...

What is the process by which a create-react app functions without the presence of an index.html file

I am currently working on a React app that I believe is based on create-react-app, although I did not initialize it myself. Something interesting about this app is that instead of having an index.html file, it contains multiple index.js files. When I run ...

Utilizing THREE.js to animate a skinned mesh along a curved path

I am working with a skinned mesh of a 'snake' that I exported from Blender. This snake has bones resembling a spine that I want to animate along a curve called SplineCurve3. While I can calculate points along the spline and the angles between th ...

NextJS-PWA detected that the start_url was responsive, but it was not through a service worker

Recently, I incorporated next-pwa (npm link) into my workflow to streamline the service-worker setup process for building a PWA in NextJS. While most things have been smooth sailing, there's one persistent error (shown below) that continues to pop up ...

What is the best way to incorporate a slider into both images and text?

I've been struggling to find a way to create a slider that includes both images and content side by side. Most tutorials I've come across only cover image carousels without incorporating text. Any suggestions on how I can achieve this would be gr ...

What is the best way to cancel Interval in a React application?

I need help with implementing setInterval in my react redux application. Below is the code snippet from FileAction.js export const SetPath = ({ path, location }) => async (dispatch) => { try { let interval; if (pre_path === path) ...

Concealing columns in Django Rest Framework: the approach to hiding data

When displaying raw_data in a list method using two tables (user_type and raw_data), how can user_type have the ability to explicitly hide certain raw_data columns (such as cid, eup, etc)? ...

Tips for concealing an alert using an 'if' statement

There is an alert that pops up on a website only on specific days of the year. My query is: How can I make the alert hidden if the date is not one of those special days? I attempted the code below, but it seems to just delay the alert based on certain con ...

deactivate the struts anchor link once the request is sent to the action

To prevent users from clicking the anchor link multiple times while a request is being processed on the server side, I need to disable the anchor tag after sending the action and wait for the response. Additionally, there is an onclick event in my anchor t ...

Configuring the start_url and scope within the manifest.json file for a React Progressive Web App

Can you explain the distinction in manifest.json between using start_url as "." versus "./", and likewise, setting scope as "." versus "./"? I am currently migrating a React app behind a reverse proxy server accessed through https://www.example.com/scorer ...

Initiate an AJAX call from any directory

Operating an asp.net website with an ajax call has presented a challenge for me when in a subfolder. I aim to streamline the ajax call process by defining it in one place: function LogOut() { $.ajax({ type: "POST", url: "Services/wsvc ...

What is the best way to store data retrieved using a model.find({}) operation?

I am currently attempting to calculate the average value of a collection in my database using Mongoose and Express. The objective is to utilize this calculated value on the "calculator" page when rendering, which is why it is embedded in a post for that sp ...

Pressing a button triggers an Ajax response, but in CasperJS it results in the entire page being refreshed

Recently, I've been experimenting with CasperJS in an attempt to identify Free-Email Alias on My focus is on the input field labeled "E-Mail-Wunschname:" where I intend to input a name, click the "Prüfen" button, and then extract the suggested accou ...

Changing Images with Button Click in Javascript

I am facing an issue with my buttons that should swap images once clicked. The first two buttons work perfectly, but for the third and fourth buttons, the images do not disappear when clicking another button. Below is the current code in the document head ...

Using arrow functions in a Polymer or lit-element project is a simple and efficient way to write

I am currently exploring Polymer/lit-element and attempting to create a simple demo project. I have been trying to incorporate an ES6 arrow function within the class (specifically, the getButtonStyle function), but encountered the following error: Synta ...