Highcharts

Highcharts: How to exempt a series from redraw zoom calculations?

心不动则不痛 提交于 2019-12-12 00:40:07
问题 In this jsfiddle the chart has a nice zoom effect every time the visiblity of a series is toggled. But when I add the UpperLimit series this effect is lost because that series has the lowest and highest x-values. How can I make the chart zoom in on the series of my choice and keep other series from affecting zoom boundaries? { name: 'UpperLimit', color: '#FF0000', dashStyle: 'ShortDash', showInLegend: false, //affectsZoomBox: false, //No such thing :( data: [ [1, 100], [10, 100] ] }, 回答1: I

Highcharts remove space before first bar and after last

为君一笑 提交于 2019-12-12 00:39:38
问题 I'm trying to remove the space at the top and bottom of this chart http://jsfiddle.net/bfa1o0ar/7/ . It's the spacing just before the first bar and after the last bar. I've tried removing padding, margins etc. $(function() { Highcharts.chart('container', { chart: { marginTop: 0, marginBottom: 0, spacingTop: 0, spacingBottom: 0, type: 'bar', title: { text: '' } }, credits: { enabled: false }, title: { text: null }, xAxis: { minPadding:0, maxPadding:0, lineWidth: 0, gridLineWidth: 0, tickWidth:

Highcharts date not showing correctly on x-axis

二次信任 提交于 2019-12-12 00:33:12
问题 I'm new to highcharts, and it has been trivial working with the arearange one. I'm trying to setup the data to be graphed, which "technically" works. It reads in epoch time, so I have that all setup. All the dates are correct. However, when it is graphed, for whatever reason it seems to just only be saying "01/17" on the x-axis for month/date. The dates are across multiple months, and you can see it in the fiddle I've provided below. http://jsfiddle.net/4azb64t7/ var data = [ [1419465600, 5,

How to calculate the height of bar chart

人盡茶涼 提交于 2019-12-12 00:32:53
问题 How can I calculate the height of a bar chart so that for different number of bars, highcharts always use the same height for a single bar. Without setting any height the size of the bars are to large for a minor number and to thin and missing labels for larger number of bars. 回答1: You can do it by dynamic change of height of your chart in dependence on your data length. http://api.highcharts.com/highcharts#chart.height chart: { marginTop: 40, marginBottom: 80, height: data.length * 20 + 120

draw pie chart from arrays in highcharts

≯℡__Kan透↙ 提交于 2019-12-12 00:29:24
问题 I want to merge two arrays and display them on chart but can't do it. Please show the correct syntax of drawing that type of chart. If someobdy could provide a jsfiddle link it would be better for my understanding. Thanks. $(function () { var name = ['chrome','firefox','opera']; var data = [11.22,81.54,6]; var final = [name,data]; $('#container').highcharts({ chart: { plotBackgroundColor: null, plotBorderWidth: null, plotShadow: false, type: 'pie' }, title: { text: 'Browser market shares

Highcharts: how to handle touch events via plotOptions.series.events

拥有回忆 提交于 2019-12-12 00:26:29
问题 On a Highcharts bar chart, when the user clicks one of the bars, additional data is loaded elsewhere on the page via the loadDetails function. loadDetails is specified as a click callback function for a chart via plotOptions.series.events : var chart = new Highcharts.Chart({ defaultSeriesType: 'bar', ... plotOptions: { series: { events: { click: loadDetails } } }, ... }); function loadDetails() { ... } The problem is I need to call the same callback function for a touchstart event on mobile

primefaces chart x axis [duplicate]

守給你的承諾、 提交于 2019-12-12 00:14:36
问题 This question already has an answer here : Primefaces 5 Rotated Axis Tick Labels (1 answer) Closed 4 years ago . You can see the problem from this site. Here is the code of my index.html file: <h:head></h:head> <h:form> <p:outputLabel value="Primefaces Tutorial"></p:outputLabel> <p:chart type="bar" model="#{viewEmployeesManagedBean.barModel}" style="height:500px" xaxisAngle="90" /> </h:form> </html> I create a chart in primefaces java. xAxis overlaps. I use xaxisAngle . But it seems it makes

HighCharts: Possible to summarize series data and show in title?

落花浮王杯 提交于 2019-12-11 23:36:10
问题 I'm looking for an answer if it's possible to sum the HighCharts series and show it in the title? I'm using JSON data for the series, so if the data looks like this: [0,0,0,1,1,1,2,2,2,3,3,3] The sum should of course be: 18. I've tried asking Google but I haven't found anything. I know I could handle it elsewhere but it would be nice to handle it directly inside the HighCharts script. Thx. /CRH 回答1: How about summing it in Javascript and then using the result when creating the title? var sum

How do I rotate the legend in Highcharts?

跟風遠走 提交于 2019-12-11 23:29:42
问题 Instead of showing the legend on the bottom under my chart, I want to show it to the left of the y axis, rotated 90 degrees. How do I do that? 回答1: You can set a custom legend: $("#a1").click(function() { $('.highcharts-legend-item:nth-child(1)').click(); $(this).toggleClass("leg-clicked"); }); Use this property in CSS to rotate the legend: -webkit-transform: rotate(90deg); Please check the following example: $(function() { $("#a1").click(function() { $('.highcharts-legend-item:nth-child(1)')

Highstock gapsize is causing line rendering issue

耗尽温柔 提交于 2019-12-11 23:28:13
问题 I'm using Highstock (v4.2.3) to present data in a StockChart with a number of different Y axes, all plotted against time on the X axis. The data has gaps in it, and I'd like to depict those gaps, but when I turn on gapSize (with any value other than zero), there's a weird quirk that causes line rendering issues--when using the navigator to zoom in on certain date ranges (not all), in some cases (whose pattern I've yet to discern) the chart fails to fully render the line across the entire x