How to remove both axes from a Google chart (e.g. chart API)

I can’t find in the Charts API a way to remove any axis from the histogram. For instance:

cht=bvg
chs=410x150
chd=s:StackOverflow

simple histogram example

How to remove gray x and y axes?

+3
source share
3 answers

All I found is this trick: cover them with a white line and it works

cht=bvg
chs=410x150
chd=s:StackOverflow
chm=r,FFFFFF,0,-0.01,0.01,1
    R,FFFFFF,0,-0.01,0.01,1

alt text

... but any "cleaner" way?

+3
source

( , )

chxt=x,y
chxs=0,,0,0,_|1,,0,0,_

:

chxt=x,y

. , x y , - , chxs.

chxs=0,,0,0,_|1,,0,0,_

, . , :

  • . chxt. 0= first (x), 1= second (y)
  • Label color. Since we will hide tags, we can leave this blank
  • The font size of the label. Setting this parameter to 0hide labels, and therefore we do not need to set empty labels using chxl
  • Label alignment. You must specify a valid value, although we do not display labels. 0OK.
  • Show axes and elevations. _hide how

Learn more at https://developers.google.com/chart/image/docs/chart_params#axis_label_styles chart

+2
source

Source: https://habr.com/ru/post/1747353/


All Articles