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.

Passing Objects to Datasets?

See original GitHub issue

I have a single dataset of events (objects) that I want to populate in a line chart. Here’s an example event:

{
    y: 25,
    name: "Test Event",
    date: "2015-06-30"
}

All of these events are members of a single data set (a single line). Is there a way to pass the data from these objects to a custom tooltip so that when I hover over a point (an event), I can see the metadata (perhaps in the tooltip template)?

All the samples I’ve seen show the data to be an array of integers only, with no access to any other metadata.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:1
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
rinogocommented, Feb 22, 2018

@kurti-vdb I’m not sure why it’s not working for you - seems to work for me! I’ve added an answer at your Stack Overflow question.

0reactions
dwilchescommented, May 27, 2020

For others coming here, a clarification about that SO question: that answer is not overriding toString because Chart.js will use the value of the field y as the value to plot, so this:

data: [ 1, 2, 3 ]

is equivalent to:

data: [ {y: 1}, {y: 2}, {y: 3} ]
Read more comments on GitHub >

github_iconTop Results From Across the Web

dataset.value returning "[object Object]" rather than the actual ...
As part of the options, I need to pass properties of these objects as data-values. I can build the select fine, but cannot...
Read more >
Passing Data Between Objects in an Application
This solves the problem of passing back data returned from a function that has more than one return type. This approach is simpler...
Read more >
Passing Parameters to the Source Dataset - RAD Studio
Client datasets can pass parameters to the source dataset to specify what data they want provided in the data packets it sends. These...
Read more >
Passing dataset object to openlightbox function - Wix.com
Hi, I can pass a string or similar objects to the function via data, but I can't pass dataset object. I have a...
Read more >
passing data sets between objects | PC Review
What is the best way to pass a data set between objects? I have a custom control which will depend on a dataset...
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