Handbook
Glossary
chart>url ( chart -- url )
Vocabulary
google
.
charts
.
private
Inputs
chart
an
object
Outputs
url
an
object
Definition
USING:
accessors
combinators
formatting
kernel
sequences
urls
;
IN:
google.charts.private
:
chart>url
( chart -- url )
[
URL" https://chart.googleapis.com/chart"
clone
]
dip
{
[
type>>
"cht"
set-query-param
]
[
[
width>>
]
[
height>>
]
bi
2dup
and
[
"%sx%s"
sprintf
"chs"
set-query-param
]
[
2drop
]
if
]
[
title>>
[
"chtt"
set-query-param
]
when*
]
[
data>>
[
"t:"
prepend
"chd"
set-query-param
]
when*
]
[
data-scale>>
[
"chds"
set-query-param
]
when*
]
[
labels>>
"chl"
set-query-param
]
[
background>>
[
rgba>hex
"bg,s,"
prepend
"chf"
set-query-param
]
when*
]
[
foreground>>
[
rgba>hex
"chco"
set-query-param
]
when*
]
[
margin>>
[
x,y
"chma"
set-query-param
]
when*
]
[
bar-width>>
[
"chbh"
set-query-param
]
when*
]
}
cleave
;