0

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.

eyllanesc
  • 235,170
  • 19
  • 170
  • 241
  • The right property is [opacity](https://doc.qt.io/qt-5/qml-qtcharts-abstractseries.html#opacity-prop) and should work as expected. Can you please provide [mcve] so we can check it? – folibis Nov 29 '20 at 07:57
  • My project is based on example project "Qml oscilloscope", so I just tested this example project how will react on property "opacity: 0.1". Again there is no visible change. Please, load this project and add to it property "opacity". – Peter Kostadinov Nov 30 '20 at 08:14
  • removing `useOpenGL` solves the issue. Probably due to performance the opacity isn't supported. From the docs: _It is optimized for efficiency, and therefore the series using it lack support for many features ..._ – folibis Nov 30 '20 at 12:13
  • folibis, thank you very much!!! It is ok now. – Peter Kostadinov Dec 01 '20 at 07:21

0 Answers0