현재 Highcharts 패키지를 사용하여 그래프를 동적으로 생성하기 위해 Highcharts 패키지를 사용하고 있습니다. 내가 웹 개발자 가장 친한 친구 인 IE에서 테스트하기로 결정하기 전까지는 모든 것이 순조롭게 진행되고있었습니다. 놀라움, 놀라움, 그것은 내 코드가 마음에 들지 않습니다. 다음하이 차트 JSON 그래프가 IE에 표시되지 않습니다
<html lang="en">
<head>
<title>Preprocessing Test</title>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
<script type="text/javascript" src="http://code.highcharts.com/highcharts.js"></script>
<script type="text/javascript" src="http://code.highcharts.com/modules/exporting.js"></script>
<link href="chemistry.css" rel="stylesheet" type="text/css" media="screen" />
<script type="text/javascript">
$(document).ready(function() {
var options = {
chart: {
renderTo: 'container',
defaultSeriesType: 'spline',
zoomType: 'x',
},
plotOptions: {
spline: {
lineWidth: 3,
states: {
hover: {
lineWidth: 1
}
},
tooltip: {
backgroundColor: '#FCFFC5',
borderColor: 'black',
borderRadius: 10,
borderWidth: 3
},
marker: {
enabled: false,
states: {
hover: {
enabled: true,
symbol: 'circle',
radius: 2,
lineWidth: 1,
}
}
}
}
},
title: {
text: 'Preprocessed Example'
},
xAxis: {
categories: [],
labels: {
step: 1
},
turboThreshold: 2000,
title: {
text: 'Test'
}
},
yAxis: {
title: {
text: 'Test'
}
},
series: [{
data:[],
name: 'Test'
}]
};
$.getJSON('files/nmr/Trimethylbenzene_test.json', function(data) {
options.series[0].data = data;
var chart = new Highcharts.Chart(options);
});
});
</script>
</head>
<body>
<div style="height: 400px;min-width:300px;" id="container"></div>
</body>
</html>
내 JSON 파일의 몇 줄의 예 : 내 코드는 당신에게 내가 함께 일하고 있어요 어떤 아이디어를주고, 내 데이터의 샘플과 함께 아래에 볼 수 있습니다
[
[-4.16606,-2.535],
[-4.16574,-1.787],
[-4.16543,0.465],
[-4.16511,1.98],
[-4.1648,1.303],
[-4.16449,-0.787],
[-4.16417,-1.571],
[-4.16386,-1.797],
[-4.16354,-2.251],
[-4.16323,-1.614],
[16.40641,-7.857]
]
IE에서 작동하지 않는 이유는 무엇입니까?
marker: {
enabled: false,
states: {
hover: {
enabled: true,
symbol: 'circle',
radius: 2,
lineWidth: 1, <-- IE doesn't like that comma!
}
}
}
그것과 같은 다른 사람을 제거
실제 오류나 증상이 나타나면 도움이됩니다 ("내 코드가 마음에 들지 않습니다"는 약간의 정보가 없습니다). 또한 테스트하고있는 IE 버전을 알려주십시오 (IE 질문에서 가장 관련성이 높은 정보이기 때문에 언급하지 않으려 고합니다.) -)). – Spudley
죄송합니다. 전체 그래프가로드되지 않습니다. 아무 것도 수행하지 않습니다. 축이 없거나 데이터가 없습니다. 마치 데이터를 어딘가에 넣으려고한다는 사실을 무시하는 것처럼 보입니다. IE 6, 7, 8에서 테스트를 해봤지만 3 가지 모두에서 작동하지는 못했지만 Firefox와 Chrome의 다양한 버전에서 완벽하게 작동합니다. – Bic1245