Highcharts(或vaadin)是否具有使用Ramer–Douglas–Peucker之类的算法的内置功能? [英] Does highcharts (or vaadin) have built-in abilities to use an algorithm like Ramer–Douglas–Peucker?

查看:115
本文介绍了Highcharts(或vaadin)是否具有使用Ramer–Douglas–Peucker之类的算法的内置功能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Vaadin的图表(最终使用HighCharts),我试图绘制一个超过10,000点的折线图.实际上,它的工作速度相当快(需要绘制几秒钟).但是,我想知道它是否会更快,因为在使用JavaFx图表时遇到一个类似的问题,并且发现人们已经使用"Ramer–Douglas–Peucker算法"实现了一种解决方案,以这种方式减少了数据点的数量.当它绘制成图形时,它基本上是人眼可察觉的. (这是SO的原始答案: JavaFX的性能问题具有65000个数据点的LineChart ).

Using Vaadin's charts (which ultimately uses HighCharts), I'm trying to plot a line graph with over 10,000 points. It actually works reasonably quickly (a couple seconds to plot). However, I wonder if it can be much faster, as I came accross a similar problem when using JavaFx charts and discovered that people have implemented a solution using the "Ramer–Douglas–Peucker algorithm" to reduce the number of datapoints in such a manner that it's basically noticeable to the human eye when its graphed. (Here's the original answer from SO: Performance issue with JavaFX LineChart with 65000 data points).

那么,highcharts是否已经具有这种内置功能?如果不是,那么瓦丹吗?还是我需要在Vaadin中重新创建此逻辑,这意味着我最终需要为Ramer–Douglas–Peucker算法找到一个Java库....

So, does highcharts already have such built in functionality? If not, does Vaadin? Or, do I need to recreate this logic in Vaadin, which means I ultimately need to find a Java library for the Ramer–Douglas–Peucker algorithm....

推荐答案

不幸的是,Highcharts没有内置的"Ramer–Douglas–Peucker算法".但是,它具有一个 boost模块,该模块可以在几毫秒内渲染数千个点.

Unfortunately, Highcharts doesn't have "Ramer–Douglas–Peucker algorithm" built-in. However, it has a boost module which allows rendering thousands of points in milliseconds.

Boost模块允许WebGL渲染某些系列类型 而不是默认的SVG.这允许成千上万的数据 点数,以毫秒为单位.除了WebGL 渲染,它通过跳过对图像的处理和检查来节省时间 数据.

The Boost module allows certain series types to be rendered by WebGL instead of the default SVG. This allows hundreds of thousands of data points to be rendered in milliseconds. In addition to the WebGL rendering, it saves time by skipping the processing and inspection of the data wherever possible.

API参考:

演示:

此外,使用Highstock您可以使用 dataGrouping .

What's more, using Highstock you can use dataGrouping.

数据分组是将数据值采样成更大的概念 块以简化可读性并提高 JavaScript图表.

Data grouping is the concept of sampling the data values into larger blocks in order to ease readability and increase performance of the JavaScript charts.

API参考:

演示:

这篇关于Highcharts(或vaadin)是否具有使用Ramer–Douglas–Peucker之类的算法的内置功能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆