0

I have a plotly line chart connecting points. Basically, for t=t_0, I want all points with x>=t to have blue color and a description on hover: "Blue", and all points with x<t to be grey with description on hover: "Grey". Any ideas how to achieve this? Thank you in advance!

N.B: Please, don't mark this question as duplicate, since the other one that I got reference to last time is a huge question filled with data. Having a clear answer to this one would be of a great use for other users as well.

Petar
  • 195
  • 2
  • 14
  • A quick idea is to split the dataset into two. The first with values >= t, the the second with values < t. Then, create a trace for each. – S3DEV Mar 21 '21 at 23:26
  • Sounds like a good idea! Actually, this is exactly what I did, but a problem appeared - for my data, for t > 18, t is included (it is in blue), and if t < 18, t is not included. This is really strange. – Petar Mar 21 '21 at 23:28
  • I found out that this happened because my dataset is large, it has 300 points. I don't see why that causes a problem – Petar Mar 21 '21 at 23:32
  • Please update the question with a sample dataset. – S3DEV Mar 21 '21 at 23:49
  • Okay, I will ask a new stackoverflow question and redirect you to it, because it is more general. – Petar Mar 21 '21 at 23:51
  • Alright, I can only post every 90 minutes, I will post it tomorrow. I hope you will have a look, because it seems that I have found a bug! :) – Petar Mar 22 '21 at 00:00
  • 2
    @Petar Regarding `N.B: Please, don't mark this question as duplicate`.... Well, it ***is*** a duplicate. And that's not the only reason why anyone would like to close ***this*** question too; No attempts, no code, no data sample, no clear description of your desired output. But if S3DEV is working on a solution that better suits your needs than the linked source in your previous question, then I'll leave it open for now. After all, we're all nice in here =) – vestland Mar 22 '21 at 00:02
  • https://stackoverflow.com/questions/66741354/plotly-line-chart-bug – Petar Mar 22 '21 at 06:43

0 Answers0