Recharts: How to move wrapper style of chart and tooltip to css ?

Created on 22 Jun 2017  路  3Comments  路  Source: recharts/recharts

Do you want to request a feature or report a bug?

feature

What is the current behavior?

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://jsfiddle.net or similar (template: http://jsfiddle.net/9y45ut13/).

What is the expected behavior?

Which versions of Recharts, and which browser / OS are affected by this issue? Did this work in previous versions of Recharts?

All 3 comments

need help here !!! @xile611

@manishjohar You can find the className of Tooltip in chrome Elements , just add styles to thiese classNames in css.

.recharts-tooltip-wrapper {
  background-color: red;
  .recharts-default-tooltip {
    //
    .recharts-tooltip-label {

    }
    .recharts-tooltip-item-list {
       .recharts-tooltip-item {
        .recharts-tooltip-item-name {}
        .recharts-tooltip-item-separator {} 
        .recharts-tooltip-item-value {}
        .recharts-tooltip-item-unit {}
      }
     }  
  }
}

@xile611 only works if you are willing to add !important to overwrite inline styles.

Was this page helpful?
0 / 5 - 0 ratings