Dynamic Style line color change in annotation chart

98 views
Skip to first unread message

abel...@gmail.com

unread,
Dec 24, 2016, 2:16:31 PM12/24/16
to Google Chart API
Dear all,

I failed to add style to annotation chart.
I want to add dynamic color to the line chart. As in line chart

I would like to get your support on this.

Any information is valuable. I use annotation chart to get zoom-range function.

Much thanks and Happy Christmas

Regards
Abel 

Evi p

unread,
Jun 2, 2021, 4:16:33 PM6/2/21
to Google Chart API
hey,

Maybe this can help to get color in your line chart.

data.addColumn({
      type: 'string',
      calc: "stringify",
      sourceColumn: 1,
      type: "string",
      role: "annotation",
      
      });

    var options = {

            
      title: ' information in milliseconden',
      
      curveType: 'function',
      
              chart: {
            
              title: ' information',
              },
           
             min_width: '100%',
             min_height: '50%',
             
             series: {
            0: { lineWidth: 3 },
            1: { lineWidth: 2 },
            2: { lineWidth: 2 },
            3: { lineWidth: 2 },
            4: { lineWidth: 2 },
            5: { lineWidth: 2 },
            6: { lineWidth: 2 },
            7: { lineWidth: 2 },
            8: { lineWidth: 2 },
            9: { lineWidth: 2 },
            10: { lineWidth: 2 }
          },
          colors: ['red',
      'purple',
      '#808080',
      "#228B22", 
      "#CB4335",
      "Gold", 
      "#FF33B3",
      "#871B47",
      'black', 
      '#e7711b',
      'blue'
       ]
    
    };

Op zaterdag 24 december 2016 om 20:16:31 UTC+1 schreef abel...@gmail.com:
Reply all
Reply to author
Forward
0 new messages