我正在创建一个带有复选框的.aspx页面,当它被选中时,必须更改收音机列表的可见性。 当我检查它时,显示了无线电列表,但是当我取消选中它时,无线电列表不会消失。 所以,我的代码就是:
前端
$('#container').each(function () {
var publico = 2111;
var abordados = 748;
chart = new Highcharts.Chart({
chart: {
renderTo: this,
type: 'column',
margin: 0,
spacingTop: 0
},
title: {
text: ''
},
xAxis: {
categories: [
'Público',
'Abordados',
'Conversão'
], title: {
text: null
},
labels: {
style: {
fontSize: '9px',
font: '9px Arial, Helvetica'
},
enabled: false
}
},
yAxis: {
endOnTick: false,
maxPadding: 0.1,
gridLineColor: 'transparent',
minorTickLength: 0,
tickLength: 0,
min: 0,
title: {
text: ''
},
labels: {
enabled: false
}
}, tooltip: {
pointFormat: ' <b>{point.y}</b> ',
shared: true
},
legend: {
enabled: false
},
plotOptions: {
bar: {
slicedOffset: 0,
size: '100%',
dataLabels: {
enabled: false
}
},
series: {
slicedOffset: 0,
shadow: false,
borderWidth: 0,
dataLabels: {
enabled: true,
formatter: function () {
if(this.x == 'Conversão'){
return Math.round(this.y / abordados * 100, 0) + '%';
}else{
return Math.round(this.y / publico * 100, 0) + '%';
}
}
}
}
},
legend: {
itemStyle: {
fontSize: '8px',
font: '8px Arial, Helvetica'
},
enabled: false
},
credits: {
enabled: false
},
series: [{
data: [
{ y:publico, color: '#199ED8' },
{ y:abordados, color: '#6CF' },
{ y:433, color: '#6FF' }
],
connectNulls: true,
pointWidth: 58
}], exporting: {
buttons: {
contextButton: {
enabled: false
}
}
}
});
});
返回端
<asp:CheckBox ID="ckbProspect" runat="server" AutoPostBack="true"
oncheckedchanged="ckbProspect_CheckedChanged" />
<asp:RadioButtonList ID="rbListProspect" runat="server" Visible="false"
AutoPostBack="true" RepeatDirection="Horizontal">
<asp:ListItem Value="1" Text="Sim"></asp:ListItem>
<asp:ListItem Value="0" Text="Não"></asp:ListItem>
</asp:RadioButtonList>
我如何解决这个问题以及它的错误?