import LineChart from "https://deno.land/x/d3nodata@v0.1.3.1/charts.ts"
Prop Name | Type | Default Value | Required | Description |
---|---|---|---|---|
datasets | {label: string, color: string, data: {x: Date, y: number}[]}[] |
N/A | No | Use this format if you want to have multiple lines on your line chart. Each line is customizable with the props listed in the types |
lineColor | string |
#BFE4A3 |
No | The color of the line |
paddingTop paddingLeft paddingRight paddingBottom |
number |
70 |
No | Add Top, left, right, and bottom padding to chart, respectively |
width | number |
800 |
No | The width of the chart |
height | number |
600 |
No | The height of the chart |
addAxesLabel | boolean |
false |
No | Add x and y labels to the chart |
xAxisLabel | string |
x label |
No | The text of your x axis |
yAxisLabel | string |
y label |
No | The text of your y axis |
axesColor | string |
#4D908E |
No | The color for you axes |
axesLabelColor | string |
#277DA1 |
No | The color of the labels for you axes |
animation | boolean |
true |
No | Animation for your lines to show up on your chart |
animationDuration | number |
5000 |
No | Time (in ms) for the lines on your chart to be animated |
addToolTip | boolean |
true |
No | Add tooltip for mouse hover on each data point |
fontFamily | string |
Verdana |
No | Font for the text for your line chart |
addTitle | boolean |
false |
No | Presence of the title for your chart. It will display at the top |
setTitle | string |
string |
No | Set the title for your chart |
setTitleSize | string |
1.5em |
No | Set the font size of your chart (in em) |
setTitleColor | string |
#277DA1 |
No | Set the color of your title for your chart |
setTitlePaddingTop | number |
40 |
No | Set how far down the title is from the top edge of the chart |