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.

Highlighting a chart point doesn't occur automatically.

See original GitHub issue

I have a chart that highlights a chart point (by changing the size and color) whenever it is done animating the first time it is drawn. However, the highlighting only visually happens when the user moves their mouse pointer over one of the points. How can I make the highlight happen automatically without needing to move my mouse over one of the points.

Here’s my highlight function:

    // Highlights the original op point by changing the point color and size
    highlightOriginalOpPoint(atrc: AtrConfiguration) {

            // This index determines which chart point to highlight
            this.originalOpPointIndex = 1; 

            // Get op point object and change the radius/color
            let meta = this.scatterChart.getDatasetMeta(0);

            let opPoint = meta.data[this.originalOpPointIndex];
            opPoint.custom = opPoint.custom || {};
            opPoint.custom.backgroundColor = "rgba(0,0,225,1)";
            opPoint.custom.radius = 7;

            this.scatterChart.update();
        }
    }

This is called when the chart is done animating the first time it is drawn - I’ve checked my logs too - it’s definitely being called when it is done drawing but the effects don’t visually happen until the user moves their mouse over one of the points. I’ve added update() to my highlight function but the update doesn’t seem to happen until later. Any ideas?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
etimbergcommented, Aug 24, 2016

@katsuragi545 I got it working here http://jsfiddle.net/jjawbtce/1/

I added a comment before the call to update describing my change.

0reactions
katsuragi545commented, Aug 24, 2016

Thanks @etimberg - works perfectly! You’ve saved me a lot of time. Thanks for the explanation as well.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Highlighting Periods in Excel Charts - My Online Training Hub
Highlighting Periods in Excel Charts helps your users interpret them more quickly and or focus their attention on a point or area.
Read more >
Highlight High and Low Points in an Excel Chart [The Right Way]
Want to dynamically highlight high and low points in an Excel chart? This article shows you how so that you can better tell...
Read more >
Highlight the Specific data point in a Line Chart Dynamically
DynamicChart #LineChart #SelectionChangeEventHello Friends,In this video you will learn how to highlight the specific data point in a Line ...
Read more >
Highlight High and Low Points in Excel Line and Column Charts
Download the Excel file with instructions here: https://www.myonlinetraininghub.com/label-excel- chart -min-and-maxView my comprehensive ...
Read more >
Conditional formatting EXCEL charts - Dynamic and Automatic ...
Take your Excel Bar Charts and Column Charts to the next level by adding dynamic highlighting that updates automatically as the 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