File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -5,8 +5,7 @@ import { HorizontalBar } from 'react-chartjs-2';
55const FeatureImportancesBarchart = props => {
66 const sorted_features = Object . keys ( props . data ) . sort (
77 ( a , b ) => props . data [ b ] - props . data [ a ] ) . slice ( 0 , 15 ) ;
8- const values = sorted_features . map (
9- feature => props . data [ feature ] . toFixed ( 3 ) ) ;
8+ const values = sorted_features . map ( feature => props . data [ feature ] ) ;
109 const data = {
1110 labels : sorted_features ,
1211 datasets : [
@@ -18,10 +17,19 @@ const FeatureImportancesBarchart = props => {
1817 }
1918 ]
2019 } ;
20+ const options = {
21+ scales : {
22+ xAxes : [ {
23+ ticks : {
24+ min : 0.0
25+ }
26+ } ]
27+ }
28+ } ;
2129
2230 return (
2331 < div style = { { height : 300 , width : 600 } } >
24- < HorizontalBar data = { data } />
32+ < HorizontalBar data = { data } options = { options } />
2533 </ div >
2634 ) ;
2735} ;
You can’t perform that action at this time.
0 commit comments