Interactive geo
Named coordinates and values over national or regional geography.
- Purpose
- Plot named coordinates and values over geographic geometry.
- Use when
- Location and spatial distribution provide important context.
- Avoid when
- Precise coordinates, values, or geographic detail must be compared.
- Equivalent data
- Every variant includes a table with series, point, coordinate, value, and class.
Exact coordinate values
| Series | Kind | Point | Longitude | Latitude | Value | Class |
|---|---|---|---|---|---|---|
| Brazil capitals | effect-scatter | Manaus | -60.02 | -3.12 | 81 | text-on-surface-strong dark:text-on-surface-dark-strong |
| Brazil capitals | effect-scatter | Recife | -34.88 | -8.05 | 27 | |
| Brazil capitals | effect-scatter | Brasília | -47.88 | -15.79 | 47 | |
| Brazil capitals | effect-scatter | Rio de Janeiro | -43.17 | -22.91 | 59 | |
| Brazil capitals | effect-scatter | São Paulo | -46.63 | -23.55 | 18 | |
| Brazil capitals | effect-scatter | Porto Alegre | -51.23 | -30.03 | 63 |
Exact coordinate values
| Series | Kind | Point | Longitude | Latitude | Value | Class |
|---|---|---|---|---|---|---|
| São Paulo cities | São Paulo | -46.63 | -23.55 | 12 | ||
| São Paulo cities | Campinas | -47.06 | -22.91 | 76 | ||
| São Paulo cities | Ribeirão Preto | -47.81 | -21.18 | 41 | text-on-surface-strong dark:text-on-surface-dark-strong |
Usage Example
@interactive.Geo(interactive.GeoConfig{
Label: "São Paulo cities",
Geometry: interactive.GeoGeometrySaoPaulo,
VisualRange: &interactive.GeoVisualRange{Min: 0, Max: 100},
Series: []interactive.GeoSeries{{
Name: "São Paulo cities",
Kind: interactive.GeoSeriesScatter,
Points: []interactive.GeoPoint{
{Name: "São Paulo", Longitude: -46.63, Latitude: -23.55, Value: 12},
{Name: "Campinas", Longitude: -47.06, Latitude: -22.91, Value: 76},
{Name: "Ribeirão Preto", Longitude: -47.81, Latitude: -21.18, Value: 41},
},
}},
Width: "100%", Height: "500px",
Options: interactive.ChartOptions{
Export: &chartcontrol.ExportOptions{Filename: "são-paulo-cities"},
},
})Choose a map type
Use Geo for positioned points. Use Map when values belong to geographic regions.
Go API
v0.0.1The examples above cover behavior and composition. pkg.go.dev is the canonical reference for exported types, functions, methods, and Go documentation.
github.com/araihu/goshtoso-charts/components/interactiveEnabled, disabled, hidden, and omitted wrapper behavior, controls, export, and client transitions are shared by every chart. Review chart controls, then compare static/vector and interactive capabilities.