使用java和websocket创建高清图 [英] Create a highchart using java and websocket

查看:144
本文介绍了使用java和websocket创建高清图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个可以帮助我的网络项目吗?规格如下。

■概述使用WebSocket,实现Web屏幕示例。从服务器端定期向客户端发送数字数据,并使用Web屏幕上的HighCharts执行图形显示。 http://www.highcharts.com/



■规格



1)服务器端

作为WEB服务器对应的Web服务器,要使用Tomcat。与客户端建立连接后,每500毫秒服务器端向客户端发送数字数据。数值数据是0到1000的随机整数值。



2)客户端

有一个HTML文件,有设施连接和断开服务器。连接到服务器后,一旦从服务器接收到数据,就会在图形显示中实时显示。虽然与服务器的连接也会停止图形显示一旦断开连接,重新连接后恢复图形显示。 (可能很清楚)



服务器连接/断开连接可能有一个按钮。



3)要从服务器传输的数据(客户端收到的)

要从服务器端定期传输的数据,采用以下json格式和数据。



来自服务器端的定期数值数据,来自json格式的数据发送。当时的数据和数字以及以下格式。



{时间:HH:mm:SS.sss,←当前时间价值 :1←0~1000整数值}



我尝试过:



i想要一个简洁的想法或源代码。

I want to create a web project can any one help me? specification as follows.
■ Overview Using WebSocket, implement a sample of Web screen. Send Regularly numerical data to the client side from server side and carry out the graph display using the HighCharts on the Web screen. http://www.highcharts.com/

■ Specifications

1) server-side
As WEB server corresponding to WebSocket, to use the Tomcat. Once you have the connection with the client, in every 500msec server-side sends numeric data to the client side. Numerical data is a random integer value of 0 to 1000.

2) the client side
Have one of the HTML file, with facility of connection and disconnection of the server. After connecting to the server, upon receiving the data from the server Reflected in the graph display in real time. Although connection with the server also stop the graph display Once you disconnect, Resume the graph display After re-connection. (It may be clear)

There may be a button on the connection / disconnection from the server.

3) data to be transmitted (the client received) from the server
Data to be transmitted from the server-side regular basis, in the following json format And data.

Regularly numerical data from the server-side with data from the json format Send. The data at the time and numeric and the following format.

{"Time": "HH: mm: SS.sss", ← the current time "Value": "1" ← 0 ~ 1000 integer value }

What I have tried:

i want a brif idea or source code.

推荐答案

很抱歉,但本网站不提供订购代码。显示您尝试过的内容,人们会尽力帮助您。
Sorry but this site does not provide code to order. Show what you have tried and people will try to help you.


这篇关于使用java和websocket创建高清图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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