Skip to content

Commit

Permalink
Merge pull request #1552 from FormidableLabs/task/audit-immutable-demo
Browse files Browse the repository at this point in the history
Audits and adds demo: ImmutableDemo
  • Loading branch information
Wendy Parsons authored May 5, 2020
2 parents 9125a7b + b6ad6a8 commit 2dfe113
Show file tree
Hide file tree
Showing 5 changed files with 896 additions and 5 deletions.
6 changes: 3 additions & 3 deletions demo/js/components/immutable-demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -674,10 +674,10 @@ class App extends React.Component {
{ x: 2, y: -4, l: "dog" },
{ x: 3, y: -2, l: "bird" }
])}
style={fromJS({
style={{
data: { stroke: "black", strokeWidth: ({ active }) => (active ? 4 : 2) },
labels: { fill: "black" }
})}
}}
/>
</VictoryChart>

Expand All @@ -688,7 +688,7 @@ class App extends React.Component {
padding={{ top: 100, bottom: 40, left: 50, right: 50 }}
containerComponent={
<VictoryCursorContainer
cursorLabel={({ datum }) => `${round(datum.x, 2)} , ${round(datum.y, 2)}`}
cursorLabel={(datum) => `${round(datum.x, 2)} , ${round(datum.y, 2)}`}
/>
}
>
Expand Down
2 changes: 2 additions & 0 deletions demo/ts/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import CursorContainerDemo from "./components/victory-cursor-container-demo";
import DraggableDemo from "./components/draggable-demo";
import ErrorBarDemo from "./components/victory-errorbar-demo";
import EventsDemo from "./components/events-demo";
import ImmutableDemo from "./components/immutable-demo";
import LegendDemo from "./components/victory-legend-demo";
import LineDemo from "./components/victory-line-demo";
import PieDemo from "./components/victory-pie-demo";
Expand All @@ -39,6 +40,7 @@ const MAP = {
"/draggable-demo": { component: DraggableDemo, name: "DraggableDemo" },
"/error-bar": { component: ErrorBarDemo, name: "ErrorBarDemo" },
"/events-demo": { component: EventsDemo, name: "EventsDemo" },
"/immutable": { component: ImmutableDemo, name: "ImmutableDemo" },
"/legend": { component: LegendDemo, name: "LegendDemo" },
"/line": { component: LineDemo, name: "LineDemo" },
"/pie": { component: PieDemo, name: "PieDemo" },
Expand Down
Loading

0 comments on commit 2dfe113

Please sign in to comment.