问:我要构建一个页面,单击某个页面标签后该页面将打开,并且该页面显示的图片是通过连续的最新数据进行连续更新的,它在1分钟内接收到许多数据点,我只想在过去的每一分钟中保存最后一点;对于当前分钟,我想显示最新点为当前分钟;我应该得到一些关于这个的结构还是这个模块/ app的例子?
答:您需要使用js文件作为折线图
。./home/shiva/Desktop/WORKSPACE/odoo-9/openerp/addons/Test_module/static/src/js
遵循以下代码:
//Test ID
var myLineTest = $("#demo");
// color of lines
var lineColor = "#edgfhf";
var lineStroke = 4;
// background color of Test element
var TestBackground = "#fgdh";
// color of <a href="you have to taking plugin path here"
// color of grid number
var gridNumeralColor = "#dfg";
// interval of the chart graduation grid
var gridLineFrecuency = 45;
// number of decimals
var GridNumeralDecimals = 10;
// drwas the avarage line in the chart
var ChartAvarage = true/false;
// X values
var XValues = [9.49, 9.48,9.47,9.46,9.45, 9.44, 9.43,9.42,9.41,9.40,9.39];
// Y values
var YValues = [150, 360, 200, 225, 560, 450, 220, 550, 630, 100, 280, 480];
// draws the line chart on the Canvas element
LineChart();