File tree Expand file tree Collapse file tree 1 file changed +23
-8
lines changed
site/examples/statistics/waterfall/demo Expand file tree Collapse file tree 1 file changed +23
-8
lines changed Original file line number Diff line number Diff line change @@ -25,23 +25,38 @@ const DemoWaterfall = () => {
2525 return d . isTotal ? '#96a6a6' : d . value > 0 ? '#F56E53' : '#3CC27F' ;
2626 } ,
2727 } ,
28- label : [
29- {
30- text : 'value' ,
31- formatter : '~s' ,
32- position : 'inside' ,
33- fontSize : 10 ,
34- } ,
28+ labels : [
3529 {
3630 text : ( arg ) => {
37- return `${ arg . y1 / 10000000 } 亿 ` ;
31+ return `${ arg . __end__ / 1000000 } 百万 ` ;
3832 } ,
3933 position : ( d ) => ( d . value > 0 ? 'top' : 'bottom' ) ,
4034 textBaseline : ( d ) => ( d . value > 0 ? 'bottom' : 'top' ) ,
4135 fontSize : 10 ,
4236 dy : ( d ) => ( d . value > 0 ? - 4 : 4 ) ,
4337 } ,
38+ {
39+ text : ( arg ) => {
40+ return `${ arg . value / 1000000 } 百万` ;
41+ } ,
42+ position : 'inside' ,
43+ fontSize : 10 ,
44+ } ,
4445 ] ,
46+ tooltip : {
47+ items : [
48+ {
49+ name : 'start' ,
50+ channel : 'y' ,
51+ valueFormatter : '~s'
52+ } ,
53+ {
54+ name : 'end' ,
55+ channel : 'y1' ,
56+ valueFormatter : '~s'
57+ }
58+ ]
59+ }
4560 } ;
4661 return < Waterfall { ...config } /> ;
4762} ;
You can’t perform that action at this time.
0 commit comments