section |
# Dataset & Chart
Boston weather data collected from the National Centers for Environmental Information.
In this tutorial, we create a radial chart showing the temperature and precipitation in Boston over the course of a year.
|
|
section |
# Create a Data-Driven Guide
|
|
timeBegin |
timeEnd |
text |
0.00 |
3.00 |
Add a data-driven guide to the glyph editor
|
|
timeBegin |
timeEnd |
text |
3.00 |
8.09 |
Add `Avg. Temperature`, `Min. Temperature`, and `Max. Temperature` to the data-driven guide
|
|
section |
# Create the Glyph
|
|
timeBegin |
timeEnd |
text |
8.09 |
12.31 |
Add a line mark, anchored between the maximum tempearture and the minimum temperature
|
|
section |
# Arrange the Glyphs in a Radial Layout
|
|
timeBegin |
timeEnd |
text |
12.31 |
14.99 |
Apply a circular scaffold to the chart canvas
|
|
timeBegin |
timeEnd |
text |
14.99 |
17.90 |
Arrange the glyphs along the angular axis
|
|
section |
# Style the Glyphs
|
|
timeBegin |
timeEnd |
text |
17.90 |
28.83 |
Map `Avg. Temperature` to the line stroke color and select a Spectral gradient
|
|
timeBegin |
timeEnd |
text |
28.83 |
35.07 |
Adjust the inner radius and outer radius
|
|
section |
# Add a Circle Mark to the Glyph
The circle mark will represent precipitation.
|
|
timeBegin |
timeEnd |
text |
35.07 |
45.90 |
Add a circle mark to the glyph anchored to the average temperature
|
|
timeBegin |
timeEnd |
text |
45.90 |
55.20 |
Map `Precipitation` to the circle size and set the end of the size range to 3000
|
|
timeBegin |
timeEnd |
text |
55.20 |
67.70 |
Set the color of circles to light blue and set the opacity to 0.2
|
|
section |
# Style the Chart
|
|
timeBegin |
timeEnd |
text |
67.70 |
76.70 |
Set the colors of Axis to Gray
|
|
timeBegin |
timeEnd |
text |
76.70 |
84.27 |
Anchor the top of the Title text to the center of the chart
|
|
timeBegin |
timeEnd |
text |
84.27 |
94.10 |
Change the font family and font color of the Title text
|
|
section |
# Finalize the Chart
|
|
timeBegin |
timeEnd |
text |
94.10 |
101.27 |
Change the chart size
|
|
timeBegin |
timeEnd |
text |
101.27 |
104.99 |
Adjust the top margin of the chart
|
|