-
Notifications
You must be signed in to change notification settings - Fork 88
Conversation
@@ -73,8 +73,8 @@ module.exports = { | |||
return this.getDomainFromCategories(props, axis); | |||
} | |||
// find the global min and max | |||
const rawDatasets = (props.stacked || this.shouldGroup(props)) ? props.data : [props.data]; | |||
const datasets = Data.formatDatasets(rawDatasets, props) | |||
const hasMultipleDatasets = props.stacked || this.shouldGroup(pro |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line cut off?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Weird...
83ac4fd
to
30ed2e3
Compare
This might work for statically styled components (I'll let @boygirl comment on the new API); we still need to address perf in cases where styles are dynamic. |
c10f113
to
1453c11
Compare
1453c11
to
125ccd2
Compare
@@ -251,6 +252,12 @@ export default class VictoryBar extends React.Component { | |||
|
|||
static getDomain = BarHelpers.getDomain.bind(BarHelpers); | |||
|
|||
componentWillMount() { | |||
this.memoized = { | |||
getStyles: memoizerific(1)(Helpers.getStyles) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we get a code comment as to what memoizerific(1)
is doing?
Hmm... tests are passing locally but not in CI. I'm investigating. |
a7589a0
to
55689b1
Compare
import { VictoryLabel } from "victory-label"; | ||
import { Helpers } from "victory-util"; | ||
import { VictoryLabel } from "victory-core"; | ||
import { Helpers } from "victory-core"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import { Helpers, VictoryLabel } from "victory-core";
import { PropTypes as CustomPropTypes, Helpers } from "victory-util"; | ||
import { VictoryAnimation } from "victory-animation"; | ||
import { PropTypes as CustomPropTypes, Helpers } from "victory-core"; | ||
import { VictoryAnimation } from "victory-core"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
^
Looks good - just some style / trivial comments. PERF++! |
@divmain I think there are still a few references to victory-label in the demos |
hmm, actually all of the demos are broken except for the axis demo. Now I'm sad that CI is passing :( Are you able to reproduce this problem @divmain |
@boygirl I didn't think to check the demos. Figured |
cc/ @divmain some of the demos are still importing VictoryLabel from |
Meh. Sorry about that. |
@boygirl is there a way to check health of demos from CI? That would be a helpful change. |
Currently no. Since they are all their own components though, we could at least be trying to render them in tests. What I would ideally like would be screenshot comparison, but there still isn't a super good solution for that as far as I can tell. I'll open an issue for the easy win though. |
thxmuch :) |
This PR includes some performance improvements. We will also be dropping Radium from Victory, and providing docs for how to use the two together. But that change will occur in a separate PR.
Here's what performance looks like after the changes (including removal of Radium). This is a ~3-4x improvement over the original performance.
/cc @boygirl @coopy