Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Bind value to dynamic Chartview series name



  • HI all,

    I am creating chart series in loop as follows:

    chart.createSeries(ChartView.SeriesTypeLine, collection.aliases[i], axisX, axisY);
    But unlike

    LineSeries{
    name: collection.aliases[i]
    }
    dynamically created serie will not bind series.name to collection.aliases[i]
    I've tried to use Qt.binding(), but it won't save the context even in nested function and all series get same name when binding is triggered. Clojure is able to save the context, but there is an extra function inside it (I mean Qt.binding(function))
    My question is:
    Is there a way to dynamically create Binding via Qt.createObject or maybe there is a more elegant way to bind dynamically created serie?

    Thanks ahead!!!


  • Moderators

    hi @Gogoalshop and welcome

    this should work as you expect it

    can you show more of your class/file is i known to the LineSeries object?


Log in to reply