How can I hide the grid and the numerical values? I only need to show the line enter image description here
class myChard(QChartView):
def __init__(self):
super().__init__()
self.resize(300, 300)
self.setRenderHint(QPainter.Antialiasing)
chart = QChart()
self.setChart(chart)
chart.setTitle('Simple splinechart example')
self.getSeries(chart)
chart.createDefaultAxes()
chart.legend().setVisible(0)
def getSeries(self, chart):
series = QSplineSeries(chart)
series.append([QPointF(1,1),QPointF(3,1),QPointF(999,1)])
chart.addSeries(series)
class Window(QWidget):
def __init__(self):
super().__init__()
muChart=myChard()
layout2 = QVBoxLayout()
layout2.addWidget(muChart)
self.setLayout(layout2)
self.setWindowTitle("Border Layout")
if __name__ == "__main__":
app = QApplication(sys.argv)
window = Window()
window.show()
sys.exit(app.exec())
only need to show the line
In my case: