我在$(function() {
$('#container').highcharts({
chart: {},
tooltip: {
useHTML: true,
borderWidth: 0,
style: {
padding: 0
}
},
xAxis: {
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
},
series: [{
data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4],
events: {
click: function(event) {
copyToClipboard(this.chart.tooltip.label.div.innerHTML);
}
}
}]
});
// modified from another stackoverflow question
function copyToClipboard(html) {
// create hidden text element, if it doesn't already exist
var targetId = "clipboardInput";
target = document.getElementById("clipboardInput");
target.value = html;
target.focus();
target.setSelectionRange(0, target.value.length);
document.execCommand("cut");
}
});
之前调用了glMaterialfv()
,然后我将所有内容都设置为默认值,但它似乎对我的素材没有任何影响。我知道应该在glDrawArrays()
和glMaterial()
之间调用glBegin()
,那么如何在不调用这些函数的情况下执行此操作?
这是我的渲染功能:
glEnd()