I draw a plotline with the current time to visualize to the user where hes at currently. The date range is up to the user and if he selects a date range above a week he will see data in a daily resolution. I want to remove the "current-time"-plotline for that. Unfortunatly, when the user comes back into the a date range smaller than a week the plotline reappears but without any styling, its just a grey line. I suspect this is a bug in the highcharts library. Anything I can do about that?
This is my code where I trigger the plotline conditionally on the resolution:
plotLines: isLessOrEqualDailyResolution
? [
{
...(chartOptions.xAxis as XAxisOptions).plotLines![0],
value: new Date().getTime(),
label: {
text: format(new Date(), 'H:mm'),
rotation: 0,
verticalAlign: 'bottom',
align: 'center',
style: {
transform: 'translate(-4px, 25px)',
color: theme.palette.info.main,
fontWeight: 'bold',
},
},
},
]
: [],
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…