Unsolved problem with [QCandlestickSeries]
-
QCandlestickSeries *candkes = new QCandlestickSeries;
candkes->append(.....
chartView->chart()->addSeries(candkes);
candkes->attachAxis(axisX);
candkes->attachAxis(axisY);
....
....
candkes->setVisible(0);setVisible it is not working
can anyone help me -
@AlekHorak said in problem with [QCandlestickSeries]:
candkes->setVisible(0);
setVisible it is not working
can anyone help me"not working"? Do you perhaps intend
candkes->setVisible(true);
, or ... ? -
I want to toggle visibility and setVisible is not working , candlestick are still rendering.
using qt 5.9.2 osx qt creator -
so this is working but candles are stil visible on chart.
qDebug() << "B" << candkes->isVisible(); candkes->setVisible(0); qDebug() << "A" << candkes->isVisible();
out:
B true
A false -
@AlekHorak
Worth a try ofhide()
instead ofsetVisible(0)
, just in case that works instead? -
no , hide() doesn't work to , problem is deeper :(
-
@AlekHorak
OK, last thought. Does it happen with another series type, or can you refresh the whole chart after you've changed visibility? -
all of them are working
QLineSeries *lineHigh = new QLineSeries;
QLineSeries *lineOpen = new QLineSeries;
QLineSeries *lineClose = new QLineSeries;
QLineSeries *lineLow = new QLineSeries; -
@JNBarchan said in problem with [QCandlestickSeries]:
@AlekHorak
[...] or can you refresh the whole chart after you've changed visibility? -
@JNBarchan
chartView->repaint();
still I have candles in a chart
-
@AlekHorak Fair enough. Sorry I couldn't help. Clearly needs a candlestick Qt expert!
-
thanks for being involved
-
this should be fixed in next release,
I have solution for nowif(!i)
{
chartView->chart()->removeSeries(candkes);
}
if(i){
chartView->chart()->addSeries(candkes);
candkes->attachAxis(axisX);
candkes->attachAxis(axisY);
}