I'm working on a website where I'm using HighStock. The site was working fine and then I went away for a few hours. When I came back the chart would only display one datapoint.
Looking in the code with Chrome there were no errors and the datpoints had been printed by the PHP correctly.
By a coincidence, I noticed when resized the window it would suddenly display correctly. The only thing that's changing on resize in my CSS is the containers width (parent of the chart div).
I tried taking just a few of my datapoints into a HighStock example on JsFiddle, there I see no datapoints. https://jsfiddle.net/p9jqvw41/
Highcharts.stockChart('chart2', {
rangeSelector: {
selected: 1
},
title: {
text: 'AAPL Stock Price'
},
series: [{
name: 'AAPL Stock Price',
data: "[1574880360000,9],[1574876760000,10],[1574873160000,10]",
type: 'spline',
tooltip: {
valueDecimals: 2
}
}]
});
I also tried:
Using a proxy to visit my site, then It's displayed
correctly. (So I guess It has to be a local error?)
Using a different browser, displayed incorrectly.
Clearing Cache, still incorrectly displayed.
The only thing that would seem reasonable is that I've reached some limited number of calls to HighStock, but even that isn't consistent with some of the mentioned above.
I feel like I'm going nuts so any help would be very appreciated.
Solved: I had data in Descending order instead of Ascending, probably stopped working after update to Highchart.
Related
I am trying to display a stock chart with columns. But there is a strange issue I am facing right now. Even when the chart is completely zoomed out I am able to drag it.
Fiddle link: http://jsfiddle.net/j8cqzm4x/1/
Highcharts.stockChart('container', {
chart: {
alignTicks: false
},
rangeSelector: {
selected: 1
},
title: {
text: 'AAPL Stock Volume'
},
series: [{
type: 'column',
name: 'AAPL Stock Volume',
data: [10,20,30,40,50,60,70,80,90,100]
}]
});
Can this behavior be avoided somehow? I have went through the documentation and none of the properties I have tried worked.
Note: In the same chart making the series as 'line' does not reproduce the same behaviour.
I contacted the Highcharts support for this. It seems there was an issue in highcharts which they have already fixed on the master branch. Using the updated code resolves the issue.
http://jsfiddle.net/j8cqzm4x/4/
<script src="https://github.highcharts.com/stock/highstock.js"></script>
That is all that was needed, using master branch form github.
Demo
i'm using ChartJS and i've encountered a bizarre issue i can't figure out. it'd be awesome if someone could point out what's wrong here..
i got 2 datasets
the first one is OK. when displayed individually or when displayed with the second dataset, it remains the same (it looks identical, toggle "both" and "first" in the demo)
unlike the first dataset, the second dataset looks different when it is displayed by itself in opposed to being displayed along with the first dataset. (click "second" and "both' in the demo)
as a byproduct of this behavior (i think), i've also noticed that the second dataset's first point y position is wrong. the value is 8 yet the y position is 0. the first dataset also has 8 as its first data point and it is drawn correctly.
what am i missing..?
I'll recommend you to set a minimum and maximum display value to the Y Axis like:
yAxes: [{
gridLines: {
display: true,
drawTicks: false,
},
ticks: {
min:0,
max: 25
}
}]
If its not done, it auto-scales to the minimum and maximum value of the datasets, and it can be different in each display mode.
I am loading a column chart in 3D with Highcharts. On the inital load, the chart works perfectly. When I use setData() to change the series, the chart gains an odd white outline around its edges.
Before:
After:
I tried a few fixes such as using edgeColor and edgeWidth, although they made no difference.
Note: If I hover over one of the columns, the outline is instantly removed on that particular item until setData() occurs again.
How can I remove this white outline from the chart?
edgeWidth should be working, however there is a bug. Reported here - thanks.
As workaround, set edgeColor: 'rgba(0,0,0,0). Demo: jsfiddle.net/hdghyz2x
Bug is fixed already by commit (4c94d34) - will be included in next release (4.1.5). Available already in github version: http://github.highcharts.com/highcharts-3d.js
like this
$('#container').highcharts({
chart: {
type: 'bar',
},
title: {
text: 'Pie without borders'
},
series: [{
borderWidth: 0,
}]
});
});
I am trying to use High Stock Chart but rather than showing a line graph in it I want to show bar graph is there a possibility to do same
JS Fiddle
My end requirement is to make a graph like this
Will it involve some additional CSS
I need to show time slider at bottom as mentioned in screenshot
On Change of time interval on slider my graph will change
Please suggest on same.
After playing around with the chart I found the following solution which can be seen in the demo below:
$('#container').highcharts('StockChart', {
chart: {
type: 'column'
},
rangeSelector: {
allButtonsEnabled: true,
selected: 2
},
JSFIDDLE DEMO
The formatting is not the same as your end result but you should be able to play with the styling and ranges to make it work.
I'm running into issues while testing Highcharts javascript charting library on one of my pages.
The issue i'm seeing is none of the data is visible until I slightly adjust the browsers size. Before resizing the tooltip does show the points.
First I thought the issue was due to jquery tabs, but that was not the case. I added the fix from Highcharts recommendations. http://www.highcharts.com/studies/jquery-ui-tabs.htm
I tried calling the charts setSize() method after initialization to see if manually resizing would cause the lines to be viable.
Any ideas?
Here how i'm initializing the chart.
$(div).ready(function(){
var chart = new Highcharts.Chart({
chart: {renderTo: 'some-div', type: 'line'},
title: {text: 'Title'},
xAxis: {type: 'text',title: {text: null}},
yAxis: {title: {text: 'Usage'}},
series: [{name:"Series 1", data : [1,2,3,4,5,6,6,7,2,7] }],
legend: {enabled: true}
});
})
Figured it out, well I didn't exactly find the problem but found a solution.
Upgrading from version v2.1.6 to the latest (v2.3.5) solved it.
Looking through the changelog there were a few references to bug fixes with Jquery 1.7/1.8 compatibility issues possibly the reason.