highstock

flask + mysql写的简单监控系统

爷,独闯天下 提交于 2020-01-30 05:26:58
这里以监控内存使用率为例,写的一个简单demo性程序,具体操作根据51reboot提供的教程写如下。 一、建库建表 创建falcon数据库: mysql > create database falcon character set utf8 ; Query OK , 1 row affected ( 0.00 sec ) 创建内存监控使用的表stat,表结构如下: CREATE TABLE `stat` ( `id` int ( 11 ) unsigned NOT NULL AUTO_INCREMENT , `host` varchar ( 256 ) DEFAULT NULL , `mem_free` int ( 11 ) DEFAULT NULL , `mem_usage` int ( 11 ) DEFAULT NULL , `mem_total` int ( 11 ) DEFAULT NULL , `load_avg` varchar ( 128 ) DEFAULT NULL , `time` bigint ( 11 ) DEFAULT NULL , PRIMARY KEY ( `id` ), KEY `host` ( `host` ( 255 )) ) ENGINE = InnoDB AUTO_INCREMENT = 0 DEFAULT CHARSET = utf8 ; 二

HighStock navigator from a stacked area chart shows wrong series

让人想犯罪 __ 提交于 2020-01-25 10:45:17
问题 I got a little problem in HighStocks: I have two area series wich are stacked. The problem: In the navigator at the bottom, just the first series is shown, not the resulted stacked chart. (see http://jsfiddle.net/Je8eG/) window.chart = new Highcharts.StockChart({ chart: { renderTo: 'container' }, plotOptions: { area: { stacking: 'normal' } }, series: [{ name: 'Series 1', data: [ [Date.UTC(2010, 0, 1, 10), 53.5], [Date.UTC(2010, 0, 1, 10, 30), 59.5], [Date.UTC(2010, 0, 1, 11), 53.5], [Date.UTC

how to hide/show scrollbar and range selector of highcharts on button click?

余生颓废 提交于 2020-01-17 08:40:31
问题 I wish to hide/show the navigator, scrollbar & rangeselector on a button click. There doesnt seem to be any API for it. .hide() hides the whole chart. Any reference towards the solution will be helpful. 回答1: You can show/hide each SVG elements. Example: http://jsfiddle.net/dJbZT/99/ $('#btn').toggle(function () { chart.rangeSelector.zoomText.hide(); $.each(chart.rangeSelector.buttons,function(i,b){ b.hide(); }); chart.rangeSelector.inputGroup.hide(); chart.scroller.xAxis.labelGroup.hide();

Highstock navigator add drag-end event

孤街醉人 提交于 2020-01-15 05:19:07
问题 Is it possible to add a drag-end event on the navigator handles? Because I would get the actually navigator selection from a chart 回答1: Take a look on official highstock demo. You need to hook a setExtremes event on xAxis, and check for (event.trigger == 'navigator') . Hope this helps. 来源: https://stackoverflow.com/questions/12384768/highstock-navigator-add-drag-end-event

Initializing Highstock.js throws a jQuery error in getComputedStyle

孤街醉人 提交于 2020-01-14 10:19:06
问题 I've been able to get Highstock to work in a sample html file, but in the application I'm working on, the same Highstock code loads part ways and then throws an error: "elem.ownerDocument is undefined" around line 5950 of the unminified code of jQuery 1.5.1 (the getComputedStyle function). After some console logs, I discovered that the elem that throws the error is in fact a Highstock object and not a DOM element. I also discovered that the jQuery function in question doesn't even get called

Highstock - display number of week

天涯浪子 提交于 2020-01-11 11:14:09
问题 How can I show the week number for the date in Highstock ( not Highcharts !)? My SQL looks like this select unix_timestamp(date)*1000 week (....) group by yearweek(date,3) My JS $(function() { $.getJSON('json_chart.php', function(data) { // Create the chart $('#container').highcharts('StockChart', { rangeSelector : { selected : 2 }, title : { text : 'Wyniki' }, xAxis: { type: 'datetime', dateTimeLabelFormats: { day: '%e' } }, yAxis: [{ offset: 40, title: { text: 'Ilośc' }, lineWidth: 2 }, {

Highcharts (Highstock) - Highcharts does not remove yAxis as expected

不打扰是莪最后的温柔 提交于 2020-01-07 06:57:10
问题 I am facing problem in removing yaxis in highcharts(highstock). I have the below snippet to explain the issue in a better way. My chart loads with 3 initial yAxis and then I try to add or delete yAxis dynamically on the fly. For some reason its not removing the appropriate yaxis but removes series from another yAxis. To reproduce the issue try to execute the following steps - Click on "Add yAxis" button Enter 1 in the text field and click on "delete yAxis" button Click on "delete yAxis"

Highcharts plotBand animation

爷,独闯天下 提交于 2020-01-07 04:40:33
问题 I have a plotband that resizes dynamically. At the moment is works by removing old one and drawing next. Is there any way to update plotBand's position parameters in the way it could animate moving? 回答1: It's not part of the API , but it's possible to update plotBand's options, demo: http://jsfiddle.net/2sqpt1aa/ Snippet: var chart = $("#container").highcharts(), // get chart plotBand = chart.xAxis[0].plotLinesAndBands[0]; // get first plotBand // Update options: plotBand.options.from = 2010;

Highstock | Zooming on xAxis causes Browser Crash

和自甴很熟 提交于 2020-01-07 04:22:13
问题 I really don't know what to do anymore. I am developing a highstock chart in my webapplication. the data is loaded correctly but as soon as i enable the zoomType : 'x' in the Chart options i start to get an error at zooming. I can't reproduce the error properly. But when i try to zoom along the xAxis and select nearly every point which is displayed in the chart it runs and zooms just fine. But when i select a smaller group of points the browser just stops until chrome shuts down. In the task

Reading data from CSV with highstock

最后都变了- 提交于 2020-01-07 02:48:33
问题 3 days trying all methods of loading data into Highstock chart end I have some problems with my code: 1. Date on Xaxis is displayed "2013-04-23 21:07:40" in line; not sorted day, hour Value temperature is rounded to the nearest value example 19.44 - in graph 19 I dont have button "zoom" end window "from" "to" i dont have range selector I want graph like in this site: http://www.highcharts.com/stock/demo/data-grouping I'm not a good programmer, but I try. I find in this forum similar problem,