Combo Chart: haxis.slantedText changed position

103 views
Skip to first unread message

Sergej

unread,
May 21, 2016, 1:21:31 PM5/21/16
to Google Visualization API
Hello All! 
I need help! I use the Combo Chart and a have a small trouble.
It's my code:

...
var options = {
          title: array['title'],
          vAxis: {title: 'Count'},
          legend : {
                      position : 'bottom'
                    },
          hAxis: {
                  slantedText: true, 
                  slantedTextAngle: array['slantedTextAngle'],
                  showTextEvery:1,
                  textPosition:'out',
                },
          seriesType: 'bars',
          chartArea:{left:55, top:40, right:10, bottom:120, width:200},
          series: {5: {type: 'line'}},
          colors:['#819FF7','#7CCD7C', '#e6693e']  
        };
      var chart = new google.visualization.ComboChart(document.getElementById(array['div']));
      chart.draw(data, options);
...

it's a picture of my Combo Chart:


09:00 10:00..15:00 are shifted to left from coloumns (I would like that they become on center ), but on this picture (07-14.05 and others are rotated on 90 degrees) they are on center

What i can do?




 

Daniel LaLiberte

unread,
May 22, 2016, 12:32:08 PM5/22/16
to Google Visualization API
Try using this option hAxis: { ticks: [array-of-explicit-ticks] } 
and specify exactly the tick values that correspond to your rows of data.

Or change your domain data (column 0) into strings, so the will be treated as discrete values, and ticks between values will not be computed.

--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-visualizati...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/47ae49ae-2fa8-40af-8d5d-4eb703d2f3b4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Sergej

unread,
May 23, 2016, 1:31:12 PM5/23/16
to Google Visualization API
Many thanks for your reply! I use Google Charts in the first time and i don't know some options. I will try to use hAxis.ticks option.

воскресенье, 22 мая 2016 г., 19:32:08 UTC+3 пользователь Daniel LaLiberte написал:
To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsub...@googlegroups.com.



--
Reply all
Reply to author
Forward
0 new messages