Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Two colors of the QLineSeries
Forum Updated to NodeBB v4.3 + New Features

Two colors of the QLineSeries

Scheduled Pinned Locked Moved Unsolved General and Desktop
7 Posts 3 Posters 1.2k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Loc888
    wrote on last edited by
    #1

    I need to create a QLineSeries with 2 colors on the same line, is it possible to do? If not, how could i achieve this kind of effect?

    image.png

    jsulmJ 1 Reply Last reply
    0
    • L Loc888

      I need to create a QLineSeries with 2 colors on the same line, is it possible to do? If not, how could i achieve this kind of effect?

      image.png

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Loc888 You could split the series into several series one for each segment/color combination

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      V 1 Reply Last reply
      2
      • JonBJ JonB referenced this topic on
      • jsulmJ jsulm

        @Loc888 You could split the series into several series one for each segment/color combination

        V Offline
        V Offline
        Vijaykarthikeyan
        wrote on last edited by
        #3

        @jsulm Split the series means declaring more lineseries components?

        jsulmJ 1 Reply Last reply
        0
        • V Vijaykarthikeyan

          @jsulm Split the series means declaring more lineseries components?

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @Vijaykarthikeyan Split means: instead of one series you have several of them (one for each color).

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          V 1 Reply Last reply
          1
          • jsulmJ jsulm

            @Vijaykarthikeyan Split means: instead of one series you have several of them (one for each color).

            V Offline
            V Offline
            Vijaykarthikeyan
            wrote on last edited by
            #5

            @jsulm But, If I want gradient between two colors like two colors are overlapping.. Can I achieve with this technique?

            jsulmJ 1 Reply Last reply
            0
            • V Vijaykarthikeyan

              @jsulm But, If I want gradient between two colors like two colors are overlapping.. Can I achieve with this technique?

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @Vijaykarthikeyan said in Two colors of the QLineSeries:

              Can I achieve with this technique?

              Well, you could, but that would be very inefficient (one series for each color in the gradient).

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              V 1 Reply Last reply
              1
              • V Vijaykarthikeyan referenced this topic on
              • jsulmJ jsulm

                @Vijaykarthikeyan said in Two colors of the QLineSeries:

                Can I achieve with this technique?

                Well, you could, but that would be very inefficient (one series for each color in the gradient).

                V Offline
                V Offline
                Vijaykarthikeyan
                wrote on last edited by
                #7

                @jsulm can you help me to solve this: https://forum.qt.io/topic/150794/qml-graph-glitch

                1 Reply Last reply
                0

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved