是否有可能破解GTK渲染到OpenGL纹理(Is it possible to hack GTK to render to OpenGL texture)
我正在编写一个OpenGL游戏,并希望看到原生的GUI元素。 我想知道是否有人使用
GtkOffscreenWindow
和gtk_offscreen_window_get_pixbuf
成功地对GTK +渲染为OpenGL纹理,并且考虑到这会有合理的性能,考虑到每次GUI更新时重复上传纹理数据I'm writing an OpenGL game, and want native looking GUI elements. I was wondering if anyone has successfully hacked GTK+ using
GtkOffscreenWindow
andgtk_offscreen_window_get_pixbuf
to render to an OpenGL texture, and whether this would have reasonable performance, considering repeated re-uploading of texture data every time the GUI is updated
原文:https://stackoverflow.com/questions/6551191
最满意答案
不仅适用于整个系列,您还可以为各个点启用标签,
plotOptions:{ arearspline:{ datalabels: { enabled: false } } }
串联数据:
data: [37707.0, 37031.0, { y: 37037.0, dataLabels: { enabled: true, formatter: function () { return this.series.name; } } }, 37748.0, 39672.0, 41747.0],
在这里更新你的小提琴: http : //jsfiddle.net/CgAj2/1/
希望对你有帮助
Not only for the entire series, you can have labels enabled for individual points also,
plotOptions:{ arearspline:{ datalabels: { enabled: false } } }
in series data:
data: [37707.0, 37031.0, { y: 37037.0, dataLabels: { enabled: true, formatter: function () { return this.series.name; } } }, 37748.0, 39672.0, 41747.0],
updated your fiddle here: http://jsfiddle.net/CgAj2/1/
hope this will help you
相关问答
更多-
您必须使用图表加载事件来更新图表xAxis类别 chart: { height: 500, events: { load: function() { var cat_data = []; this.series[0].data.map((el) => { cat_data.push(el.category + '
UUs: ' + el.options['unique_users']) }) ... -
Highcharts OHLC烛台上的单点自定义数据标签(Custom data label for a single point in OHLC candlestick in Highcharts)[2023-08-24]
对于烛台图,您可以用完全相同的方式覆盖dataLables。 只需将dataLables对象添加到该系列中的点即可。 http://jsfiddle.net/kwukv4by/10/ series: [{ type: 'candlestick', name: 'AAPL Stock Price', data: [{ time: 0, high: 100, low: 50, open: 60, ... -
您可以迭代每个系列中的每个点,然后检查条的宽度并在widht小于ie.15px时销毁标签。 http://jsfiddle.net/HA5xE/1/ $.each(chart.series,function(i,serie){ $.each(serie.data,function(j,data){ if(data.yBottom - data.plotY < 15) data.dataLabel.destroy(); ...
-
HighCharts基于时间的季度数据 - xAxis标签问题(HighCharts Time-based Quarterly Data - xAxis Label Issue)[2021-12-27]
您可以将tickInterval设置为三个月 http://jsfiddle.net/yHmrZ/5/ tickInterval: 3 * 30 * 24 * 3600 * 1000, 但是当你想要动态改变范围时,你应该使用tickPostitioner You can set tickInterval as three months http://jsfiddle.net/yHmrZ/5/ tickInterval: 3 * 30 * 24 * 3600 * 1000, But when you wo ... -
不仅适用于整个系列,您还可以为各个点启用标签, plotOptions:{ arearspline:{ datalabels: { enabled: false } } } 串联数据: data: [37707.0, 37031.0, { y: 37037.0, dataLabels: { enabled: true, formatter: functio ...
-
根据我对这个问题的评论,解决方案是添加 crop: false, overflow: 'none' 我会留下这个问题,以防它帮助别人。 As per my comment on the question, the solution is to add crop: false, overflow: 'none' I'll leave this question up in case it helps someone else though.
-
在Highcharts规范图中,如何将绘图带标签置于居中位置?(In a Highcharts gauge graph, how can I position plotband labels centered?)[2023-03-26]
您可以使用svg textPath元素在绘图带上放置文本。 如果将startOffset属性设置为25%(请参阅下面的如何计算正确的startOffset值),文本将根据绘图带居中。 渲染text和textPath的功能可以是这样的: function renderText(textStr, plotBand, i) { const id = `plot-band-${i}` const chart = plotBand.axis.chart const path = plotBand.svgE ... -
只需更改您在数组中推送项目的顺序即表示 代替 var serie = new Array(EthicReg[i].Value, EthicReg[i].year); EthicsRegistration.push(serie); 使用 var serie = new Array(EthicReg[i].year, EthicReg[i].Value); EthicsRegistration.push(serie); 此外,如果您获得年份值, ...
-
实际上数据是渲染的,但你看不到它,因为正常状态下该点的标记半径为0,但当鼠标悬停在它上面时它将是可见的。 这种情况正在发生,因为您已禁用标记并已启用悬停。 为了获得可见的点,请打开它们。 plotOption: { area:{ marker: { enabled: true, -----continue with other properties---- } } } 在这里更新你的小提琴: http : //jsfiddle.net ...
-
可能有很多方法可以做到这一点。 一种方法是设置特定dataLabels点的dataLabels对象。 根据数据的大小,这可以直接在系列数据上完成,如下所示( JSFiddle ): series: [{ data: [107, 31, 635, { y: -203, dataLabels: { align: 'left' } }, { y: -300, dataLabels: { align: 'left' } }] }] 或者你可以在初始化图表时使用回调函数循环遍历你的系列并以相同的方式设置它, ...