How to make chart fit the react-tabs inside React-Grid-Layout?
Nessuno ha ancora preso questa issue.
- Lingua principale
- JavaScript
- Stelle
- 3.1k
- Fork
- 455
- Merge medio
- 5h 9m
- PR unite (30g)
- 2
Descrizione
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
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Non è indicato alcun file del repository né alcun test. Inizia riproducendo il layout annidato di React-Grid-Layout, react-tabs e TVChartContainer descritto nell’issue, quindi esamina come l’altezza e la larghezza vengono passate attraverso i pannelli delle schede. Il lavoro è completato quando viene identificata una correzione a livello di repository oppure viene documentato il comportamento di dimensionamento richiesto con un test di regressione, se il progetto ne supporta uno.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript, react
- Ambito
- frontend
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 20/100