Highcharts

$.each only shows one series highcharts

不问归期 提交于 2019-12-12 17:26:00
问题 Focusing in this question: php-json-highcharts-load-database-result The answer was to do the follow each : $.getJSON('ajax/calc.ajax.php', function(data) { var series = { // <-------------------- create just one series object type: 'pie', data: [] //data array for new series }; $.each(data, function(key, value) { series.data.push([key, value[0]]); }); options.series.push(series); // <-------- pushing series object var chart = new Highcharts.Chart(options); }); This works using pie charts, and

Programmatically draw rect and line in Highcharts with zoom

别来无恙 提交于 2019-12-12 17:23:50
问题 I'm doing some programmatic drawing in Highcharts using Highcharts.Renderer using path() and rect() . In the code below I have manually plotted the coordinates for the line and rect. In reality the are related to the main data series (dates with values). How can I programmatically draw something and make the zoom work? The main graph, with zoom: chart: { zoomType: 'x', }, xAxis: { categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] }, series: [{

Highcharter annotation on date x-axis not working - R

六眼飞鱼酱① 提交于 2019-12-12 17:08:20
问题 I am trying to add annotation for my highcharter chart, not sure why it is not working, instead it is showing [object][object]. Here is my data, structure(list(variable = structure(c(15522, 15553, 15584, 15614, 15645, 15675, 15706, 15737, 15765, 15796), class = "Date"), value = c(417376, 423563, 430290, 455643, 451542, 422419, 429472, 451694, 454900, 456844)), row.names = c(NA, 10L), .Names = c("variable", "value" ), class = "data.frame") Code, I am trying to add annotation only for last

JSFiddle API examples are broken

佐手、 提交于 2019-12-12 16:37:48
问题 From the API documentation in: http://api.highcharts.com/highcharts#chart.alignTicks Clicking in align ticks true example: http://jsfiddle.net/gh/get/jquery/1.7.2/highslide-software/highcharts.com/tree/master/samples/highcharts/chart/alignticks-true/ Doesn't render the chart. The following error appears in the JS console: Uncaught TypeError: Object [object Object] has no method 'highcharts' 回答1: problem is .highchart. Use var chart = new Highcharts.Chart({ chart: { //alignTicks: false, type:

Highstock with data.csv starts with 01.01.1970

拜拜、爱过 提交于 2019-12-12 16:36:42
问题 I've started experimenting with Highstock charts to visualize my photovoltaics data. The problem is, that the chart starts with 01-01-1970 00:00:00. It ignores the date and time in my csv-file. This code is the same as some examples here, but it doesn't work. My data.csv 2011-08-01 00:00:00,155 2011-08-02 00:00:00,156 2011-08-03 00:00:00,157 2011-08-03 00:06:00,160 2011-08-04 00:00:00,120 My index.html $(document).ready(function() { var c = []; var d = []; var options = { chart: { renderTo:

Customizing default y-axis label in Highcharts

℡╲_俬逩灬. 提交于 2019-12-12 16:34:57
问题 I want to prefix a $ to the default y-axis label. My bar chart is using values in the millions so the chart is returning value-MM (80MM, 30MM). What I would like to do is format the y-axis like $-value-MM ($80MMm $30MM). I have tried the code below and can't get it to work? yAxis: [{ // Primary yAxis labels: { formatter: function () { return '$' + this.value; } }, title: { text: 'Revenue', 回答1: One rather elaborate way to achieve this is to re-use the code Highcharts uses in their internal

Highcharts - Highstock: fixed width intervals with scrollbar

不羁的心 提交于 2019-12-12 16:09:35
问题 I need the points of my chart to have a fixed width (say, 100px each). If the needed space exceed the width of the chart, I just want to be able to scroll horizontally (with the scrollbar.enabled parameter set to true ). This is the basic setup, without setting the points width: http://jsfiddle.net/wxxdne19/ If I set the column width like this: http://jsfiddle.net/wxxdne19/1/ The tickPixelInterval parameter is ignored (as the documentation says, of course). I tried a bunch of other things,

highcharts is not respecting my x-axis' date interval

我们两清 提交于 2019-12-12 15:01:31
问题 I have a series of data collected every 15 minutes for a few weeks. Unfortunately, there's a week of missing data in the middle. This is just a fact of my business. When I use Highcharts to chart this data, it compresses the x-axis (time), skewing the chart. For example, the x-axis has major ticks every 2 hours until the missing week. Then it jumps to major ticks of days . Regardless of the data, I need the x-axis to remain consistent. If this causes a large gap in the diagram, so be it. I

Highcharts loading image

孤街浪徒 提交于 2019-12-12 14:26:16
问题 Using http://api.highcharts.com/highcharts#loading Is it possible to have an image as part of the overlay that is shown? specifically a "loading" gif image? I've tried using the labelStyle section, but no luck so far! 回答1: After examining the API. This does seem to be possible. labelStyle accepts any valid CSS. Properties that are normally hyphenated remove the hyphen, and capitalize the next letter. This means we can use something like background-image to supply a background image (like a

Unable to parse JSON string with highcharts exporting server with the windows phantomjs version

时间秒杀一切 提交于 2019-12-12 14:14:25
问题 What i did: Download the latest phantomjs (1.9.2, windows) Download the latest sources of highcharts-convert.js from github (note: download the whole directory) Start phantomjs with convert script in server mode: bin\phantomjs.exe --debug=yes js\highcharts-convert.js -host 127.0.0.1 -port 3003 Use CURL to send example json to phantomjs server: curl -H "Content-Type: application/json" -X POST -d '{"infile":"{xAxis: {categories: [\"Jan\", \"Feb\", \"Mar\"]},series: [{data: [29.9, 71.5, 106.4]}]