Can't set transparency of LineSeries{}

198 views Asked by At

There is an application which contains ChartView{} with LineSeries{} inside it. I'm trying to set some transparency of the LineSeries{}. First approach is with usage of "opacity":

LineSeries {
    id: lineId
    color: "red"
    opacity: 0.1
}

Second approach is with change of alpha:

LineSeries {
    id: lineId
    color: "red"
    Component.onCompleted: color = setColorAlpha(color, 0.1)
}
function setColorAlpha(color, alpha) {
    return Qt.hsla(color.hslHue, color.hslSaturation, color.hslLightness, alpha)
}

With both approaches there is no visible transparency, but for other objects they are OK.

0

There are 0 answers