Highcharts

How can I force highcharts to show every x-axis label regardless of spacing constraints?

北慕城南 提交于 2019-12-22 08:08:12
问题 I'd like to show every x-axis label, and you can see it's only showing every other one: http://jsfiddle.net/f48cjf01/2/ The relevant code: xAxis: { categories: _.pluck(_mainData, "number") , labels: { rotation: 290 , step: 1 //show every tick regardless of spacing , align: 'right' } } What do I need to do to show every tick? (I know it may look ugly here considering how little space there is...but I'd like to force it nonetheless) 回答1: One solution is to use a tickPositioner function and

How to get multiple data series into Highcharts

时光毁灭记忆、已成空白 提交于 2019-12-22 08:08:01
问题 The following code works: var options1 = { chart: { renderTo: 'container1' }, series: [{}] }; $.getJSON('tokyo.jsn', function(data){ options1.series[0].data = data; var chart = new Highcharts.Chart(options1); }); I want to be able to add a number of data series, so I am trying to take the reference to ‘new Highcharts’ out of the getJSON, but I don't seem to get it right. This following code does not work: $.getJSON('tokyo.jsn', function(data){ options1.series[0].data = data; }); var chart =

Highcharts date off by one day

做~自己de王妃 提交于 2019-12-22 07:03:36
问题 I'm passing in milliseconds for the x-axis and then defining the x-axis as: xAxis: { type: 'datetime' }, However, Highcharts seems to be not getting the exact date on the x-axis but is instead off by one day. To illustrate, hover over any of the bars (fiddle at the bottom of this post) and you will see what Highcharts interprets the day as but then click any of them and I have an on-click event to alert you what the actual date is supposed to be. Notice how it is off by one day. Is this a

highcharts draggable-points conflict between drag and click

被刻印的时光 ゝ 提交于 2019-12-22 06:48:25
问题 I am using highcharts 3.0.7 with draggable-points module, to make it possible to drag points of a displayed series. User should be able to drag a point to move it, but also to click on a point to remove it. The problem is that dragging event takes over click event and the latter is not fired. Here is my code: HTML: <script src="http://code.highcharts.com/highcharts.js"></script> <script src="http://code.highcharts.com/highcharts-more.js"></script> <script src="https://rawgithub.com/highslide

Using HighCharts and DotNet.HighCharts to “Play” Multiple Series

对着背影说爱祢 提交于 2019-12-22 06:38:21
问题 I have a set of series that I have created using VB.NET and DotNet.HighCharts: Dim SeriesList4As New List(Of Series)(stfipsList4.Count) What I want to have happen is something similar to http://jsfiddle.net/8M2fF/ except I want to be able to pass in multiple series without knowing before hand how many I have. The VB code that created that example above is this: Dim stfipsList4 = (From r In dt4.AsEnumerable() Select r("areaname")).Distinct().ToList() Dim SeriesList4 As New List(Of Series)

highchart total in tooltip

断了今生、忘了曾经 提交于 2019-12-22 06:29:30
问题 i am using this code to display a shared tooltip: tooltip: { crosshairs: true, shared: true, headerFormat: 'KW {point.key}<table>', pointFormat: '<tr><td style=\"color: {series.color}\">{series.name}: <b></td><td>{point.y} USD</b></td></tr>', useHTML: true, footerFormat: '</table>', valueDecimals: 2 }, Now i like to add all point.y values as a total value of the point. But how can i loop the point.y of each series to calculate the total value? 回答1: Excatly, see example: http://jsfiddle.net

highchart total in tooltip

孤街醉人 提交于 2019-12-22 06:28:10
问题 i am using this code to display a shared tooltip: tooltip: { crosshairs: true, shared: true, headerFormat: 'KW {point.key}<table>', pointFormat: '<tr><td style=\"color: {series.color}\">{series.name}: <b></td><td>{point.y} USD</b></td></tr>', useHTML: true, footerFormat: '</table>', valueDecimals: 2 }, Now i like to add all point.y values as a total value of the point. But how can i loop the point.y of each series to calculate the total value? 回答1: Excatly, see example: http://jsfiddle.net

Highlighting Highcharts series from a remote element

北战南征 提交于 2019-12-22 05:25:23
问题 I'm trying to figure out how to highlight a line (series) in Highcharts from an element that's not related to the Chart object in any way. I went through the documentation, and don't really see a way of achieving this. I can get into the series elements using the series.get(id) . Seems like there are no methods that can be helpful - http://www.highcharts.com/ref/#series-object Any ideas if that's even possible? 回答1: After a lot of digging and testing, I've managed to get this working - still

HighCharts Dynamically Change Chart Type

若如初见. 提交于 2019-12-22 05:16:16
问题 Using HighCharts 2.2.3 in an ASP.NET site. See http://jsfiddle.net/wergeld/TDLvc/ for code example. My site setup is a little different than what the jsFiddle shows. My function to change the series exists in an included JS file and the call to the function is not "in-line" with the chart creation JS code (although it is still wrapped in a document ready jquery). I have two issues and one of which can be seen in the jsFiddle. 1) When changing chart type it looks like the yAxis designation

Change color of bars depending on value in Highchart bar-chart with MVC3

耗尽温柔 提交于 2019-12-22 04:39:40
问题 I am using Dotnet Highchart with MVC3 I am currently working with a diagram that looks like this: I am trying to modify my code so I can change color on the bars depending on what number they have. I also wonder how I can remove the button "Snittbetyg" as you see can on the image. This is my code: public ActionResult OfficeStatistic() { { Highcharts chart1 = new Highcharts("chart1") .SetXAxis(new XAxis { Categories = new[] { "Ödmjukhet", "Engagemang", "Kompetens", "Lönsamhet" } }) .SetYAxis