XCustomPlot
XCustomPlot copied to clipboard
XCustomPlot is a chart based on QCustomPlot. In this chart, with the movement of the mouse, the value of the point on the curve is dynamically displayed. This function can be enabled or disabled throu...
``` void showTracer(bool show) { m_isShowTracer = show; if(m_xTracer) m_xTracer->setVisible(m_isShowTracer); ////////////// if(m_yTracer) m_yTracer->setVisible(m_isShowTracer); ///////////// foreach (XxwTracer *tracer, m_dataTracers) { if(tracer) tracer->setVisible(m_isShowTracer); } if(m_lineTracer) m_lineTracer->setVisible(m_isShowTracer); } ```
//像素坐标转成实际的x,y轴的坐标 float x_val = this->xAxis->pixelToCoord(x_pos); float y_val = this->yAxis->pixelToCoord(y_pos); 如果坐标轴为时间轴时,float类型需要改为double类型