gpt4 book ai didi

javascript - Highcharts 点和线缺失

转载 作者:行者123 更新时间:2023-12-03 07:33:15 25 4
gpt4 key购买 nike

这是 highcharts 为线和点生成的代码。我正在使用检查元素,点位于它们应该在的位置,但它们似乎是透明的或类似于图表后面的东西。但代码看起来是正确的。

    <g class="highcharts-series-group" zIndex="3">
<g class="highcharts-series" clip-path="url(http://localhost:63540/admin/reports.aspx?type=like#highcharts-1)" visibility="visible" transform="translate(40,10)">
<path d="M 244 50.4 L 732 302.6" fill="none" stroke="rgb(0, 0, 0)" stroke-width="5" isShadow="true" stroke-opacity="0.05" transform="translate(1,1)"></path>
<path d="M 244 50.4 L 732 302.6" fill="none" stroke="rgb(0, 0, 0)" stroke-width="3" isShadow="true" stroke-opacity="0.1" transform="translate(1,1)"></path>
<path d="M 244 50.4 L 732 302.6" fill="none" stroke="rgb(0, 0, 0)" stroke-width="1" isShadow="true" stroke-opacity="0.15000000000000002" transform="translate(1,1)"></path>
<path d="M 244 50.4 L 732 302.6" fill="none" stroke="#4D4D4D" stroke-width="2"></path><path d="M 732 298.6 C 737.328 298.6 737.328 306.6 732 306.6 C 726.672 306.6 726.672 298.6 732 298.6 Z" fill="#4D4D4D" stroke="#FFFFFF" stroke-width="0.000001" zIndex="2000"></path>
<path d="M 244 46.4 C 249.328 46.4 249.328 54.4 244 54.4 C 238.672 54.4 238.672 46.4 244 46.4 Z" fill="#4D4D4D" stroke="#FFFFFF" stroke-width="0.000001"></path></g></g>

这可能有什么问题吗?有趣的是,我从其他项目(正在运行)复制了代码,并且只更改了数据。

这是编译后的js代码:

   var dates = ['1394/12/06','1394/12/11'];
after.push(function () {
chart = new Highcharts.Chart({
chart: {
height: 500,
backgroundColor:'#eee',
renderTo: 'chart',
defaultSeriesType: 'line',
// marginRight: 130,

//marginBottom: 150,
// marginTop: 20,
// events: { click: function () { startWait($('html')); document.location = 'price.aspx' } }
},
title: {
text: '',
x: -20 //center
},
subtitle: {
text: '',
x: -20
},
xAxis: {
categories: dates,
labels: {
rotation: 90,
formatter: function () {
return this.value;
},
y:40
}

},
yAxis: {
title: {
text: ''
},
plotLines: [{
value: 0,
width: 1,
color: '#808080'
}],
labels: {
formatter: function () {
// return toFarsi(virgulize(this.value)) ;
}
}
},
tooltip: {
formatter: function () {
return "<b>" + this.y + "</b>";
}
},
legend: {
//enabled: false
},
series: [

{
name:' likes',
color:'#4D4D4D',
data: [2,1]
},

]
});
});

最佳答案

禁用 css、javascript 和许多其他测试后,一切都不起作用。感谢 jlbriggs,他的 fiddle 给了我用旧版本的 jquery 测试代码的想法。

它适用于旧版本的 jquery。

更新:新版本的 Highcharts 可与最新版本的 jquery 配合使用。

关于javascript - Highcharts 点和线缺失,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35726121/

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