Skip to content

Commit

Permalink
chore(doc): add explanation about the geo features file
Browse files Browse the repository at this point in the history
  • Loading branch information
plouc committed Dec 21, 2019
1 parent 559e3c7 commit b199b27
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 4 deletions.
10 changes: 10 additions & 0 deletions website/src/data/components/choropleth/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ Choropleth:
feature using the `match` property, the value is picked according
to the `value` accessor.
Please note that because the features file is pretty huge, **it's not included
in the generated code**, you can find the file used for this example
[here](https://github.com/plouc/nivo/blob/master/website/src/data/components/geo/world_countries.json),
you'll have to pass the `features` array to the `features` property.
The responsive alternative of this component is `ResponsiveChoropleth`.
This component also have a canvas implementations,
[ChoroplethCanvas](self:/choropleth/canvas), which should be used
Expand All @@ -43,5 +48,10 @@ ChoroplethCanvas:
component, should be used used when you have complex geometries
as it offers better performance than its SVG counterpart.
Please note that because the features file is pretty huge, **it's not included
in the generated code**, you can find the file used for this example
[here](https://github.com/plouc/nivo/blob/master/website/src/data/components/geo/world_countries.json),
you'll have to pass the `features` array to the `features` property.
The responsive alternative of this component is
`ResponsiveChoropleth`.
10 changes: 10 additions & 0 deletions website/src/data/components/geomap/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ GeoMap:
[official d3 documentation](https://github.com/d3/d3-geo)
for further information.
Please note that because the features file is pretty huge, **it's not included
in the generated code**, you can find the file used for this example
[here](https://github.com/plouc/nivo/blob/master/website/src/data/components/geo/world_countries.json),
you'll have to pass the `features` array to the `features` property.
The responsive alternative of this component is `ResponsiveGeoMap`,
it also offers a canvas implementations, see
[GeoMapCanvas](self:/geomap/canvas).
Expand All @@ -38,4 +43,9 @@ GeoMapCanvas:
geometries as it offers better performance than its SVG
counterpart.
Please note that because the features file is pretty huge, **it's not included
in the generated code**, you can find the file used for this example
[here](https://github.com/plouc/nivo/blob/master/website/src/data/components/geo/world_countries.json),
you'll have to pass the `features` array to the `features` property.
The responsive alternative of this component is `ResponsiveGeoMap`.
2 changes: 1 addition & 1 deletion website/src/pages/choropleth/canvas.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const ChoroplethCanvas = () => {
defaultProperties={ChoroplethCanvasDefaultProps}
propertiesMapper={mapper}
codePropertiesMapper={properties => ({
features: [],
features: '/* please have a look at the description for usage */',
...properties,
tooltip: properties.tooltip ? Tooltip : undefined,
})}
Expand Down
2 changes: 1 addition & 1 deletion website/src/pages/choropleth/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ const Choropleth = () => {
defaultProperties={ChoroplethDefaultProps}
propertiesMapper={mapper}
codePropertiesMapper={properties => ({
features: [],
features: '/* please have a look at the description for usage */',
...properties,
tooltip: properties.tooltip ? Tooltip : undefined,
})}
Expand Down
2 changes: 1 addition & 1 deletion website/src/pages/geomap/canvas.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const GeoMapCanvas = () => {
defaultProperties={GeoMapCanvasDefaultProps}
propertiesMapper={mapper}
codePropertiesMapper={properties => ({
features: [],
features: '/* please have a look at the description for usage */',
...properties,
})}
hasData={false}
Expand Down
2 changes: 1 addition & 1 deletion website/src/pages/geomap/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const GeoMap = () => {
defaultProperties={GeoMapDefaultProps}
propertiesMapper={mapper}
codePropertiesMapper={properties => ({
features: [],
features: '/* please have a look at the description for usage */',
...properties,
})}
hasData={false}
Expand Down

0 comments on commit b199b27

Please sign in to comment.