Hi,
Is it possible to show my text to always in flashing mode like when there is error in the system. The word ‘érror’ will show up and keep flashing,
<blink>Error</blink>
hi, I’m too new on this. Can you give me the full example regarding to the blinking mode? because I tried but it can’t works
Paste the code you’re working with and I’ll try to help adjust.
var profileChartScatter = function(name,color) {
this.xref=‘paper’,
this.y=,
this.x=,
this.name=name,
this.type=‘scatter’,
this.mode=‘markers+text’,
this.text=ALARM,
this.connectgaps=false,
this.SetData = function(x, y){
if(x)
this.x=x;
if(y)
{this.y=y;}
},
this.marker= { size: 20 ,
color: color },
this.textposition=‘bottom right’,
this.textfont={
family: ‘Arial Black’,
size: 12,
color: color
}
};
the graph can’t show up after add “”
ok, i don’t believe text property allows html. but you might be able to try hovertemplate. try this:
hovertemplate = '<blink>%{text}</blink>',
text = 'ALARM',
hi, it can’t works too.
I’m not certain that is supported. I think only some HTML elements are allowed in hover template. It was worth a shot. Maybe someone else has an idea. You might need a hacky type of solution where you use javascript to add and remove an annotation, giving the illusion of a blink.
var layout = {
annotations: [
{
x: 2,
y: 15,
text: 'Blinking annotation',
showarrow: false,
}
]
};
Plotly.newPlot('myDiv', data, layout);
// Function to blink the annotation
var isAnnotationVisible = true;
setInterval(function() {
if (isAnnotationVisible) {
layout.annotations[0].text = ''; // Hide annotation
} else {
layout.annotations[0].text = 'Blinking annotation'; // Show annotation
}
Plotly.relayout('myDiv', layout); // Update the layout
isAnnotationVisible = !isAnnotationVisible; // Flip the flag
}, 1000); // Change annotation every second
thank you very much