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.

Overlapped line chart show wrong color order when hover

See original GitHub issue

Lightweight Charts Version: 3.4.0

Steps/code to reproduce:

var series = chart.addLineSeries({
  color: "green",
  lineWidth: 2
});

series.setData(data);

var series2 = chart.addLineSeries({
  color: "red",
  lineWidth: 2
});

series2.setData(data);

Actual behavior:

The crosshair when hover show as red but the line show in the chart is green.

Expected behavior:

The crosshair when hover should be in green since the green line is above the red line

Screenshots:

Screen Shot 2021-07-26 at 16 48 44

CodeSandbox/JSFiddle/etc link:

https://codesandbox.io/s/hardcore-frost-3pxjn?file=/src/index.js

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
timocovcommented, Jul 27, 2021

@thanhlmm Sure.

I’d start from the following places:

Probably there is some differences between the order of sources for crosshair and for pane.

1reaction
thanhlmmcommented, Jul 26, 2021

The crosshair when hover should be in green since the green line is above the red line

I think the opposite - the line should be red instead of green since the red line was created after the green one, so this looks like a bug I think.

Yeah whatever order but I think I should show the same like what the line is displayed, If it is green, the crosshair should show green

Read more comments on GitHub >

github_iconTop Results From Across the Web

Overlap of color fill between 2 line series react chartjs
I having this issue in version 3.6.0. chart.js · react-chartjs-2 · Share.
Read more >
How to Show Overlapping Lines in Chart JS - YouTube
How to Show Overlapping Lines in Chart JSIn this video we will explore ... We need to visually adjust it and make sure...
Read more >
Overlapping lines, change display order
I want to bring one line to the front and overlap the other. I've tried to change the ordering in the 'Line Values'...
Read more >
Graph-like Charts - Special Settings
Number overlay charts display a value either by itself or over an underlying chart. These are a great choice for clearly displaying information...
Read more >
Line chart options | Looker - Google Cloud
If set to multiple colors, colors are assigned to each series in order. The first series in the underlying table is assigned the...
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