Highcharts

Highstock X-Axis: Categories in Place of Time

心已入冬 提交于 2019-12-18 09:11:32
问题 Is it possible to use categories as x-values in Highstock? I don't need a time bar as x-axes, but something like numbered ratings. This works in Highcharts, but i need the scrollbar functionality from Highstock. 回答1: You can use highstock release, but use highcharts and scrollbar. Take look at example: var chart = new Highcharts.Chart({ chart: { renderTo: 'container' }, xAxis:{ min:0, max:2, categories:['first','second','third','fourth'] }, scrollbar: { enabled: true }, rangeSelector: {

Highchart: Background color of Axis

末鹿安然 提交于 2019-12-18 09:05:52
问题 I saw a similar question here. In reply its written that we can have background color by making a rectangle. My question is how I can get x and Y position of all the ticks on axis. I will need it because I want background color only on alternate dates. Thanks 回答1: Did you try to use labels.formatter with background and useHTML flag? Something like this: http://jsfiddle.net/AeV7h/ xAxis: { categories: ['Foo', 'Bar', 'Foobar'], labels: { useHTML: true, formatter: function() { return '<span

How to prevent column overlap in Highcharts

淺唱寂寞╮ 提交于 2019-12-18 08:25:32
问题 I believe this is a general question not needing to much information from my highcharts data. I want to prevent the columns to stack over/overlap each other, how do I do this? See image-link below on how it is now http://highslide.com/forum/download/file.php?id=3157 jsfiddle: http://jsfiddle.net/Dzs5q/ 回答1: Please try and reproduce the error here @ http://jsfiddle.net/jugal/bgNBG/ Highcharts by default smartly reduces width of the columns if there are way too many of them so as to avoid

Highcharts tooltip background according to line (without setting backgroundColor = null)

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-18 07:23:11
问题 I have this exact same issue: Highcharts tooltip background according to line but the solutions provided here do not work for me because setting backgroundColor to null makes the pointer arrow disappear: Hence why I have been working with trying to update the tooltip background color from the formatter itself where I have access to the series color: args.options = Object.assign(args.options, {backgroundColor : this.series.color}); this.color = this.series.color; But for some reason only the

Highcharts plotLine drag xAxis event [closed]

≡放荡痞女 提交于 2019-12-18 07:16:14
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . I would like to drag a plotLine on xAxis and detect this change. Can someone please provide an example ? Edit @DiMono Here is what I have tried so far. The click event is not firing. By this approach I would like to add, dragstart, dragend etc events to enable drag functionality. <html> <head> <script type="text

Auto Update Highcharts with Ajax

邮差的信 提交于 2019-12-18 07:15:35
问题 Hopefully somebody can be of help to me here. I'm trying to update a graph with information from ajax, I've already confirmed that the ajax is of the correct format etc and the initial graph load works perfectly but it doesn't seem to update correctly. My code: $(document).ready(function() { var options = { chart: { renderTo: 'cpuhealth', type: 'column' }, title: { text: 'CPU Usage' }, yAxis: { labels: { formatter: function() { return this.value + ' %'; } }, title: { text: 'Usage (%)' } },

Highcharts Donut Chart text in center change on hover

左心房为你撑大大i 提交于 2019-12-18 07:00:31
问题 I'm looking for a way to have text in the center of a donut chart change on hover. When there is no hover state, the center will display the total amount (here I am representing vacation days, so it may be 15 vacation days). When hovering, the text in the center needs to match the segment hovered over (available, requested, and taken vacation days), but I cannot figure out how to change the text in the center based on hover. Does anyone have any ideas? Any help is greatly appreciated!! http:/

How to position RangeSelector / zoom buttons at custom co-ordinates in Highstock

穿精又带淫゛_ 提交于 2019-12-18 06:39:04
问题 I am using highstock charts and wish to move the zoom buttons (1m,2m,etc) to a different position. I checked their API and there doesn't seem to be an option to do that currently. Also the source code suggests that this location is hardcoded and hence i don't think I can easily inject the position using some undocumented property Highstock Source Highcharts.RangeSelector.prototype.render = function (min, max) { ... rangeSelector.zoomText = renderer.text(lang.rangeSelectorZoom, plotLeft, chart

Highcharts dynamically change bar color based on value

让人想犯罪 __ 提交于 2019-12-18 06:07:30
问题 I am creating a column type graph using json data. Here is the JS function i call to get the data using ajax call and plot the chart. function getChart(){ var categorySeries = []; var dataSeries = []; var url = "CallToControllerURL"; $.getJSON(url, function(response) { $.each(response, function(i, item) { categorySeries .push(response[i].dateVal); dataSeries.push(response[i].count); }); $('#chartDiv').highcharts({ chart : {type : 'column'}, title : {text : 'Date vs Count'}, xAxis :

Highcharts dynamically change bar color based on value

血红的双手。 提交于 2019-12-18 06:07:05
问题 I am creating a column type graph using json data. Here is the JS function i call to get the data using ajax call and plot the chart. function getChart(){ var categorySeries = []; var dataSeries = []; var url = "CallToControllerURL"; $.getJSON(url, function(response) { $.each(response, function(i, item) { categorySeries .push(response[i].dateVal); dataSeries.push(response[i].count); }); $('#chartDiv').highcharts({ chart : {type : 'column'}, title : {text : 'Date vs Count'}, xAxis :