highchars之IE8浏览器下 X轴文字显示重叠应如何解决
页面为教师端首页查看教师端下各个班级所有学生考试成绩统计曲线图,谷歌浏览器显示如下:
IE8浏览器下,X轴文字重叠,页面显示如下:
JS:
function LoadClassAssess(classId) { if (classId > 0) { $.ajax({ type: "post", url: "/Teacher/HomeManage/GetClassAssessGra/", cache: false, data: { classId: classId, pageIndex: _pageIndex, newtime: new Date().getTime() }, success: function (data) { _pageIndex = data.pageIndex; _totalPage = data.totalPage; _currentPage = data.AName.length; //左边按钮样式 if (_pageIndex>0) { $(".prev2").removeClass("arrowN").addClass("arrowB"); } else { $(".prev2").removeClass("arrowB").addClass("arrowN"); } //右边按钮样式 if (_totalPage>_pageIndex+_currentPage) { $(".next2").removeClass("arrowN").addClass("arrowB"); } else { $(".next2").removeClass("arrowB").addClass("arrowN"); } //图形加载 var chart = new Highcharts.Chart({ chart: { renderTo: 'containerAssess', type: 'line', width: 1100, height: 219, marginTop: 35 }, colors: ['#FF6EC7', '#32CD99', '#24CBE5'], plotOptions: { spline: { lineWidth: 1.5, marker: { enabled: false, states: { hover: { enabled: true, symbol: 'square', radius: 2 } } } } }, title: { text: '', x: -20 //center }, subtitle: { text: '', x: -20 }, xAxis: { labels: { style: { 'fontSize': '10px' } }, categories: data.AName//原格式输出@Html.Raw(); }, yAxis: { title: { text: '' }, tickInterval: 50, max: 100, min: 0, plotLines: [{ value: 0, width: 1, color: '#808080' }] }, tooltip: { valueSuffix: '', shared: true, useHTML: true }, series: [{ name: '平均分', data: data.Average }, { name: '最高分', data: data.MaxGrade }, { name: '最低分', data: data.MinGrade }] }); } }); } };
请大神给予技术指导,在此谢过!!!
本文来自博客园,作者:念冬的叶子,转载请注明原文链接:https://www.cnblogs.com/fqzhong2007/p/6483175.html