import ChoroplethChart from "https://deno.land/x/d3nodata@v0.1.3.1/charts.ts"
Prop Name | Type | Default Value | Required | Description |
---|---|---|---|---|
data | {data: numbers, name: string}[] |
WorldPopulationData | No | An array containing objects with 2 properties listed in the Default Value section |
fontSize | number |
10 |
No | Font size of tool tip text |
widthPadding | number |
0 |
No | Additional padding translates map inside of container SVG |
heightPadding | number |
0 |
No | Additional padding translates map inside of container SVG |
paddingTitle | number |
15 |
No | The padding between the top of the SVG and the title text |
width | number |
700 |
No | Set the width of the SVG |
height | number |
700 |
No | Set the height of the SVG |
stepArr | number[] |
undefined |
No | Pass in stepArr if you want to customize legend values. If this is being passed in, colorArr must be passed in with length 2 greater than stepArr. This defaults to a linear scale between the min and max of the data set with legendSteps number of steps |
colorArr | string[] |
undefined |
No | colors chosen for color. thresholdScale must also be true |
legendSteps | number |
6 |
No | The number of steps in our legend |
legendSvgPadding | number |
0 |
No | The Padding between the left edge of the SVG and the legend |
lowColor | string |
lightblue |
No | The color for low values on the color scale |
highColor | string |
darkblue |
No | the color for high values on the color scale |
offHoverOpacity | number |
0.8 |
No | A number between 0 and 1 for opacity of chart elements that aren't being hovered over |
title | string |
Example Text |
No | Title text |
scale | number |
75 |
No | A number reprepsenting what scale to size projection map, 150 is 100% to scale |
center | [number,number] |
[0,0] |
No | 2 value number array representing center coordinate of map. Useful for moving the map around to focus on different countries |
thresholdScale | boolean |
true |
No | A switch to change country coloring to match legend color exactly |