Stacked bar won't use entire width of available space
See original GitHub issue🧐 问题描述 [详细地描述问题,让大家都能理解]
I’m currently trying to create a table where each cell has a stacked + percent bar that stretches to the entire width of the table cell. I’m assuming the width value is dependent on the “total” value, which in my case is not constant between cells.
💻 示例代码 [如果有必要,展示代码,线上示例,或仓库]
const config = {
data: [
{
state: "active",
cluster: clusterName,
usage: resourceUsage,
},
{
state: "inactive",
cluster: clusterName,
usage: inactiveResources,
},
],
xField: "usage",
yField: "cluster",
seriesField: "state",
/* CHART OPTIONS */
width: 400,
height: 60,
padding: "auto",
/* BAR */
isStack: true,
isPercentage: true,
barWidthRatio: 1,
renderer: "svg",
/* GRID/AXIS */
xAxis: {
grid: {
line: {
style: {
stroke: "black",
lineWidth: 1,
strokeOpacity: 0.1,
},
},
},
label: {
style: {
fontSize: 0,
},
},
},
yAxis: {
label: {
style: {
fontSize: 0,
},
},
tickLine: {
style: {
opacity: 0,
},
},
grid: {
line: {
style: {
stroke: "black",
lineWidth: 1,
strokeOpacity: 0,
},
},
},
},
tooltip: {
domStyles: {
"17plot-tooltip": {
marginTop: "-5rem",
},
},
},
legend: {
offsetX: 8,
itemSpacing: 2,
},
}
🚑 其他信息 [如截图等其他信息可以贴在这里]
Issue Analytics
- State:
- Created a year ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Navigation bar won't entirely fill screen width - Stack Overflow
Using CSS, I set the width of my nav tag to 100%, as well as the border and padding set to 0. I...
Read more >A Complete Guide to Stacked Bar Charts | Tutorial by Chartio
Stacked bar charts extend the standard bar chart by dividing each bar into multiple subcategories. Learn how to best use this chart type...
Read more >Stacked bar chart not extending the whole width of the canvas?
Hello,. I am having difficulties with getting stacked bar charts to extend the entire width of the container div/canvas.
Read more >Stacked Bar Graph Bar Width - JMP User Community
I am having issues increasing the size of the bars in my stacked bar graph. ... To utilize all of the available space,...
Read more >How to Adjust Your Bar Chart's Spacing in Microsoft Excel
How to Widen Your Chart's Bars · Step 1. Right-click on any of the colored bars. In the drop-down menu, select Format Data...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments