Skip to content

Instantly share code, notes, and snippets.

@exogen
Created October 22, 2015 05:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save exogen/f6cac57ee065b700edf2 to your computer and use it in GitHub Desktop.
Save exogen/f6cac57ee065b700edf2 to your computer and use it in GitHub Desktop.
New per-datum style
<VictoryChart
interpolation="basis"
axisLabels={{x: "x axis", y: "y axis"}}
x={[
[1, 2, 3, 4],
[-2, -1, 0, 1, 3],
[3, 4, 6]
]}
y={[
[1, 2, 10, 4],
(x) => x * x,
[-5, -4, -3, -2, 2, 3]
]}
yAttributes={[
{name: "line-one", type: "scatter", symbol: "triangleUp"},
{name: "line-two", type: "line"},
{name: "line-3", type: "scatter"}
]}
style={{
data: [
{ fill: "red" },
{ stroke: "green" },
{ fill: "blue" }
]
}}/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment