1
1
/* eslint-disable no-magic-numbers, react/no-multi-comp */
2
2
import React from "react" ;
3
3
import PropTypes from "prop-types" ;
4
- import { assign , merge , keys , random , range , round } from "lodash" ;
4
+ import { keys , random , range , round } from "lodash" ;
5
5
import { fromJS } from "immutable" ;
6
6
import { VictoryClipContainer , VictoryLabel , VictoryTheme } from "victory-core" ;
7
7
@@ -36,7 +36,7 @@ class Wrapper extends React.Component {
36
36
renderChildren ( props ) {
37
37
const children = React . Children . toArray ( props . children ) ;
38
38
return children . map ( ( child ) => {
39
- return React . cloneElement ( child , assign ( { } , child . props , props ) ) ;
39
+ return React . cloneElement ( child , Object . assign ( { } , child . props , props ) ) ;
40
40
} ) ;
41
41
}
42
42
@@ -214,7 +214,7 @@ class App extends React.Component {
214
214
target : "data" ,
215
215
mutation : ( props ) => {
216
216
return {
217
- style : merge ( { } , props . style , { fill : "gold" } ) ,
217
+ style : Object . assign ( { } , props . style , { fill : "gold" } ) ,
218
218
} ;
219
219
} ,
220
220
} ,
@@ -223,7 +223,7 @@ class App extends React.Component {
223
223
target : "data" ,
224
224
mutation : ( props ) => {
225
225
return {
226
- style : merge ( { } , props . style , { fill : "orange" } ) ,
226
+ style : Object . assign ( { } , props . style , { fill : "orange" } ) ,
227
227
} ;
228
228
} ,
229
229
} ,
@@ -232,7 +232,7 @@ class App extends React.Component {
232
232
target : "data" ,
233
233
mutation : ( props ) => {
234
234
return {
235
- style : merge ( { } , props . style , { fill : "red" } ) ,
235
+ style : Object . assign ( { } , props . style , { fill : "red" } ) ,
236
236
} ;
237
237
} ,
238
238
} ,
@@ -344,7 +344,7 @@ class App extends React.Component {
344
344
345
345
< svg height = { 500 } width = { 500 } >
346
346
< VictoryCandlestick
347
- style = { merge ( { } , chartStyle , { data : { width : 10 } } ) }
347
+ style = { Object . assign ( { } , chartStyle , { data : { width : 10 } } ) }
348
348
data = { fromJS ( [
349
349
{
350
350
x : new Date ( 2016 , 6 , 1 ) ,
@@ -414,7 +414,7 @@ class App extends React.Component {
414
414
{
415
415
mutation : ( props ) => {
416
416
return {
417
- style : merge ( { } , props . style . labels , {
417
+ style : Object . assign ( { } , props . style . labels , {
418
418
fill : "orange" ,
419
419
} ) ,
420
420
} ;
@@ -432,7 +432,7 @@ class App extends React.Component {
432
432
{
433
433
mutation : ( props ) => {
434
434
return {
435
- style : merge ( { } , props . style , { fill : "blue" } ) ,
435
+ style : Object . assign ( { } , props . style , { fill : "blue" } ) ,
436
436
} ;
437
437
} ,
438
438
} ,
@@ -468,7 +468,7 @@ class App extends React.Component {
468
468
target : "data" ,
469
469
mutation : ( props ) => {
470
470
return {
471
- style : merge ( { } , props . style , { stroke : "lime" } ) ,
471
+ style : Object . assign ( { } , props . style , { stroke : "lime" } ) ,
472
472
} ;
473
473
} ,
474
474
} ,
@@ -477,7 +477,7 @@ class App extends React.Component {
477
477
target : "labels" ,
478
478
mutation : ( props ) => {
479
479
return {
480
- style : merge ( { } , props . style , { fill : "green" } ) ,
480
+ style : Object . assign ( { } , props . style , { fill : "green" } ) ,
481
481
text : "waddup" ,
482
482
} ;
483
483
} ,
@@ -572,7 +572,7 @@ class App extends React.Component {
572
572
</ VictoryChart >
573
573
574
574
< VictoryVoronoi
575
- style = { merge ( { } , chartStyle , {
575
+ style = { Object . assign ( { } , chartStyle , {
576
576
data : {
577
577
fill : "gray" ,
578
578
opacity : 0.1 ,
@@ -631,7 +631,7 @@ class App extends React.Component {
631
631
target : "data" ,
632
632
mutation : ( props ) => {
633
633
return {
634
- style : merge ( { } , props . style , { fill : "gold" } ) ,
634
+ style : Object . assign ( { } , props . style , { fill : "gold" } ) ,
635
635
} ;
636
636
} ,
637
637
} ,
@@ -640,7 +640,7 @@ class App extends React.Component {
640
640
target : "data" ,
641
641
mutation : ( props ) => {
642
642
return {
643
- style : merge ( { } , props . style , { fill : "orange" } ) ,
643
+ style : Object . assign ( { } , props . style , { fill : "orange" } ) ,
644
644
} ;
645
645
} ,
646
646
} ,
@@ -649,7 +649,7 @@ class App extends React.Component {
649
649
target : "data" ,
650
650
mutation : ( props ) => {
651
651
return {
652
- style : merge ( { } , props . style , { fill : "red" } ) ,
652
+ style : Object . assign ( { } , props . style , { fill : "red" } ) ,
653
653
} ;
654
654
} ,
655
655
} ,
0 commit comments