I'm working on a progrma with a GUI in Qt Creator 6.3. This program consists in a widget of a radar, in which points are plotted. I'm using QtCharts/QScatterSeries library to make the points. When the dots are plotted on the radar, a legend also appears above the graph with the color of the point. This legend is called "series" and if I don't add it, it won't let me plot. A legend appears for each point I plot. Is there a way to make these legends not appear?
For the moment this function is called several times to see what it graphs, but in the future it will be in a cycle where it will have to be called more than 4000 times. I'll have the problem that all these legends are going to appear.
This is the code of the function
void RadarGUI::plotear_punto(int fila, int columna, int color){
//function that plot a point
QScatterSeries *punto= new QScatterSeries; //point
punto->setColor(QColor(255,0,0));
punto->setMarkerSize(10);
punto->setBorderColor(QColor(0,0,0));
grafPol->addSeries(punto); //this is the serie, grafPol is the radar widget
//I link the point to the axes of the radar widget
punto->attachAxis(radialAxis);
punto->attachAxis(angularAxis);
//I assign color to the point
switch (color) {
case 1:
punto->setColor(QColor(255,0,0));
break;
case 2:
punto->setColor(QColor(0,255,0)); //green
break;
case 3:
punto->setColor(QColor(255,0,0)); //red
break;
case 4:
punto->setColor(QColor(0,0,255)); //blue
break;
case 5:
punto->setColor(QColor(255,255,0)); //yellow
break;
default:
break;
}
//plot the point
float angulo = (fila*360)/nfilas;
float distancia = (columna*80)/ncolumnas;
punto->append(angulo,distancia);
}
And this is a picture of the radar.