How to make chart fit the react-tabs inside React-Grid-Layout?
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- JavaScript
- Estrellas
- 3.1k
- Forks
- 455
- Merge medio
- 5 h 9 min
- PR fusionados (30 d)
- 2
Descripción
Hi @danez
Please help. I want put the chart in a tab of a grid. I have successfully put the chart in the grid (React Grid Layout) and the chart size fits the grid, but when i put tab (React-Tab) in a grid and then the chart inside the tab. The chart wont fit anymore. How to solve?
class TvChart extends React.Component {
render() {
return (
<div>
<Tabs style={this.props.style}>
<TabList>
<Tab>Chart</Tab>
<Tab>Depth</Tab>
</TabList>
<TabPanel>
<Card>
<TVChartContainer />
</Card>
</TabPanel>
<TabPanel>
<h5>Depth</h5>
</TabPanel>
</Tabs>
</div>
);
}
}
this is the css
.TVChartContainer {
height: 100%;
width: 100%;
}
and this is the parent style
const styles = {
main: {
backgroundColor: "#ffffff",
fontSize: "10px",
height: "inherit"
},
orderbook: {
minHeight: "220px",
minWidth: "100px"
},
ask: {
width: "50%"
},
bid: {
width: "50%",
borderRight: "1px solid #151d2b"
}
};
but this one works, the chart fits the grid completely.
class TvChart extends React.Component {
render() {
return (
<Card style={this.props.style.main}>
<TVChartContainer />
</Card>
);
}
}
I appreciate if you can help.
Regards,
Ian
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
No se indica ningún archivo del repositorio ni ninguna prueba. Empieza reproduciendo el diseño anidado de React-Grid-Layout, react-tabs y TVChartContainer descrito en el issue, y después inspecciona cómo se pasan la altura y la anchura a través de los paneles de pestañas. Se considera terminado cuando se haya identificado una corrección a nivel del repositorio o se haya documentado el comportamiento de dimensionamiento requerido con una prueba de regresión, si el proyecto admite una.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- javascript, react
- Área
- frontend
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 20/100