gpt4 book ai didi

javascript - 如何删除移动应用程序中的多余空间?

转载 作者:太空狗 更新时间:2023-10-29 16:39:30 24 4
gpt4 key购买 nike

enter image description here

我正在使用 Highchart 框架开发移动应用程序,并且我已经使用 Highchart、HTML 和 CSS 制作了一个应用程序。我已经从上面的应用程序上传了屏幕截图。

我想删除图表和表格之间的空格。

图表代码如下:

$(function () {
$('#statement-graph').highcharts({
chart: {
plotBackgroundColor: null,
plotBorderWidth: 0,
plotShadow: true,
backgroundColor: 'transparent',
borderWidth: 0
},
title: {
text: 'Expense',
align: 'center',
verticalAlign: 'middle',
font: 'gothamrnd-light',
y: -10,
x : 1,
style : {
color: '#fff',
fontSize: '0.9em'
},
},
header :{

},
credits: {
enabled: false
},
subtitle: {
text: 'Rs 25000',
align: 'center',
verticalAlign: 'middle',
y: 10,
x : 1,
style : {
color: '#fff',
fontSize: '1.2em'
},
},
exporting: { enabled: false },
tooltip: {
pointFormat: '<b>{point.percentage:.1f}%</b>'
},
plotOptions: {
series: {
dataLabels: {
enabled: true,
format: '<b>{point.name}</b>',
style: {
color: 'white',
textShadow: '0px 0px 0px white',
fontWeight: '200',
font: '13px gothamrnd-light'
},
connectorColor: 'white',
}
},
pie: {
dataLabels: {
enabled: false
},
shadow: true,
center: ['50%', '50%'],
borderWidth: 0 // < set this option
}
},

series: [{
type: 'pie',
name: '',
innerSize: '50%',
showInLegend: false,
data: [
{
name: 'Utilities',
y: 45,
color : "#D2C993"
},
{
name: 'Clothing',
y: 30,
color : "#CD7D80"
},
{
name: 'Entertainment',
y: 15,
color : "#B486B1"
},
{
name: 'Medical',
y: 12,
color : "#5CB1CE"
},
{
name: 'Vacations',
y: 23,
color : "#F2C56A"
},
{
name: 'Food & Drinks',
y: 30,
color : "#F78E58"
}
]
}]
});
});

这是 Highchart 的 HTML:

<div id="statement-graph" style="
height: 60vh;
margin: 0px auto;
width: 100%;
float: left;
text-align: center;
display: table;"></div>

最佳答案

如果能看到生成的页面源代码会更好,这样我就可以识别元素的单独 ID 或类,但这里有一个建议。在您的图表代码中:

  pie: {
dataLabels: {
enabled: false
},
shadow: true,
center: ['50%', '50%'],
borderWidth: 0 // < set this option
}

尝试改变

居中:['50%', '50%'], to

居中:['50%', '25%'] 或

中心:['50%', '75%'],

...以及您的位置:

subtitle: {
text: 'Rs 25000',
align: 'center',
verticalAlign: 'middle',
y: 10,
x : 1,
style : {
color: '#fff',
fontSize: '1.2em'
},
},

你可以尝试改变

  verticalAlign: 'middle',

垂直对齐:'底部',

关于javascript - 如何删除移动应用程序中的多余空间?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37989540/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com