Highcharts

I can't return my json object

一曲冷凌霜 提交于 2019-12-12 04:34:31
问题 I'm having trouble returning a JSON object, instead all I get is an undefined variable. This code is supposed to return a json element from an API. It seems to work in the success: function, but once I try and take that data elsewhere it just displays 'undefined' var datas; datas = getdata(); //getdata(); createChart(datas) alert('2datass'+datas); // this returns undefined function createChart(data){ alert(data); //outputs undefined } function getdataaa(){ alert('ajax'); $.ajax({ type: "GET",

Stockcharts - Adding an offset to avoid drawing points at the edge

落爺英雄遲暮 提交于 2019-12-12 04:28:51
问题 Highcharts and stockcharts, they both provide the options to add some padding at the x axis in order to avoid drawing some values on the edge of the plot area (left or right). According to the doc this is archived by employing the minPadding and maxPadding members of the xAxis property of the configuration object used for constructing the chart... but in practice this is not working for stockcharts. So i wonder how i can achieve this... i leave you with the examples... var examples Working

calculate the difference between 2 series in tooltip for highstock

烂漫一生 提交于 2019-12-12 04:25:51
问题 I need some help to find a solution to display the difference between the series in the tooltip. Here <- is a simple screenshot with my problem: how can i solve this for Hamburg to Matif and Niederrhein to Matif? Here is my javascript code: $(document).ready(function() { ////////////////////////////////////////////////////////////////// // ------ Testchart Kassakurse Raps in Hamburg für 2014 ------ // ////////////////////////////////////////////////////////////////// $(function() { var chart

Why is the line not displayed in the highcharts?

大兔子大兔子 提交于 2019-12-12 04:19:52
问题 I am trying to make a donut chart using highcharts. With onmouseover I want to hide all labels and show the selected data label. I am able to do that using these lines: that.series.dataLabelsGroup.hide(); that.dataLabel.show(); But it also hides my line, which I connect to the data value of the chart. Why is the line not displayed in highcharts? Here is my code: // Mouseover handler function(e) { var that = this; var series = this.series; console.log(series); for (var i = 0; i < series.data

*Highcharts* Tooltip format

只愿长相守 提交于 2019-12-12 04:16:56
问题 I have a tooltip format like this: tooltip: { formatter: function() { return Highcharts.dateFormat('%A, %b %e, %Y',new Date(this.x)) +'<br/>'+ this.series.name + ': ' + '<b>'+ this.y +'</b>'; } }; How can I add color to my series.name because now they all black. In my chart after drawing, different series.name has different colors. Thanks 回答1: use this: tooltip: { formatter: function() { var toolTipTxt = '<b>'+ this.x +'</b>'; toolTipTxt += '<br/><span style="color:'+ this.point.series.color

Highchart scatter point not connected

自作多情 提交于 2019-12-12 04:09:32
问题 I set the lineWidth already to let every point connected to each other but it's still won't work. Please help me to inspect the sample data below and also the options setting [{"x":101.4,"y":69.235,"marker":{"fillColor":"#BF0B23"}},{"x":101.23,"y":69.24},{"x":101.03,"y":69.24},{"x":100.82,"y":69.22},{"x":100.61,"y":69.21},{"x":100.41,"y":69.21},{"x":99.95,"y":69.19},{"x":99.96,"y":69.19},{"x":100,"y":69.14},{"x":100.03,"y":69.1},{"x":100.04,"y":69.1},{"x":100.09,"y":69.085},{"x":100.15,"y":69

Highcharts box plot chart customization

試著忘記壹切 提交于 2019-12-12 04:07:25
问题 Is it possible to customize the Highcharts box plot chart to have markers instead of boxes. I need to create something that's a cross between a spleen and a box plot. I tried messing with the error bar example but can't get the spline line to be hidden without losing the markers: http://jsfiddle.net/ryfqwska/ I'm trying to create this: $(function () { $('#container').highcharts({ chart: { zoomType: 'xy' }, title: { text: 'Temperature vs Rainfall' }, plotOptions: { series: { lineWidth: 1 } },

Highchart drilldown to simultaneous multiple series and y-axis

房东的猫 提交于 2019-12-12 04:05:25
问题 Hello I would like to use HighChart package and make JS figures with drilldown capability that 1. Show multiple series at drilled-down level at the same time. 2. Use multiple (say 2) y-axis to indicate the different units from these series at the drilled-down level. Based on the starting point of the code: $(function () { // Create the chart $('#container').highcharts({ chart: { type: 'column' }, title: { text: 'Browser market shares. January, 2015 to May, 2015' }, subtitle: { text: 'Click

load multiple csv files (correct order) in one chart

回眸只為那壹抹淺笑 提交于 2019-12-12 03:54:27
问题 I want to load x csv files and render the data to a line chart. Loading 1 csv file and create a line chart works already fine. My csv file: Date,PV,Energy 1355100420,0.000,0.851 1355100480,0.000,0.841 1355100540,0.000,1.000 1355100600,0.000,0.984 1355100660,0.000,1.006 1355100720,0.000,2.769 1355100780,0.000,2.791 My problems: the number of csv files is various and the correct order is important, because the x axis is my time axis and I have the dates/times in the 1st column of my csv. Read a

Highcharts csv data series starting with a null value

。_饼干妹妹 提交于 2019-12-12 03:54:16
问题 I am trying to represent csv data with highcharts. I can not use a csv data that starts with a null value. How can I use a csv data where series starts with a null value. Though it works fine with 'empty' or '0' but I specifically need this to works with null or NA please check jsfiddle My csv looks like this Year,Annual mean,5 year mean 1880,-0.31,null 1881,-0.22,-0.25 1882,-0.28,-0.29 1883,-0.3,-0.29 1884,-0.33,-0.3 Thanks in advance 来源: https://stackoverflow.com/questions/45327619