Skip to content

Commit 7b38fdd

Browse files
committed
Update documentation for array tooltip
1 parent 5b919f6 commit 7b38fdd

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

docs/src/examples/examples_table_based_plots.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ using VegaLite, VegaDatasets
1717
dataset("seattle-temps") |>
1818
@vlplot(
1919
title="2010 Daily Max Temperature (F) in Seattle, WA",
20-
:rect,
20+
:rect,
2121
x={
2222
"date:o",
2323
timeUnit=:date,
@@ -160,7 +160,7 @@ dataset("stocks") |>
160160
color={
161161
"price:q",
162162
aggregate="sum",
163-
title="Price"
163+
title="Price"
164164
}
165165
)
166166
```
@@ -226,7 +226,6 @@ dataset("cars") |>
226226
{calculate="datum.x2 + (datum.rank_Origin - 1) * 0.01",as="nx2"},
227227
{calculate="(datum.nx+datum.nx2)/2",as="xc"},
228228
{calculate="(datum.ny+datum.ny2)/2",as="yc"},
229-
{calculate="'Origin: '+datum.Origin+', '+'Cylinders: '+datum.Cylinders",as="tt"}, #How to add a line break?
230229
]
231230
) +
232231
[
@@ -258,8 +257,7 @@ dataset("cars") |>
258257
y2=:ny2,
259258
color={"Origin:n",legend=nothing},
260259
opacity={field="Cylinders",type="quantitative",legend=nothing},
261-
#tooltip=[{field="Origin",type="nominal"},{field="Cylinders",type="quantitative"}] #array not supported
262-
tooltip={"tt:n"} #see calculate above
260+
tooltip=[{field="Origin",type="nominal"},{field="Cylinders",type="quantitative"}]
263261
) +
264262
@vlplot(
265263
mark={:text,baseline="middle"},

0 commit comments

Comments
 (0)