Highcharts

Highcharts bar chart with bar colored based on value

删除回忆录丶 提交于 2020-01-07 07:56:15
问题 I am looking for a way to create a bar chart where bars change color from light to dark depending on their value (length) as in following example: 回答1: Color can be set per point, so you could calculate what color a point should have and set it through data in chart's options. $(function() { var data = [1, 2, 3, 4, 5, 6, 7, 8, 9]; Highcharts.each(data, function(point, i) { data[i] = [point, '#f' + point + '0']; }); $('#container').highcharts({ series: [{ type: 'bar', data: data, keys: ['y',

Highcharts (Highstock) - Highcharts does not remove yAxis as expected

不打扰是莪最后的温柔 提交于 2020-01-07 06:57:10
问题 I am facing problem in removing yaxis in highcharts(highstock). I have the below snippet to explain the issue in a better way. My chart loads with 3 initial yAxis and then I try to add or delete yAxis dynamically on the fly. For some reason its not removing the appropriate yaxis but removes series from another yAxis. To reproduce the issue try to execute the following steps - Click on "Add yAxis" button Enter 1 in the text field and click on "delete yAxis" button Click on "delete yAxis"

Highcharts :the code works in Fiddle but not i Visual Studio

不问归期 提交于 2020-01-07 06:27:30
问题 I am very new to VS and Highcharts. So I need your help! I get the error below when I run my code in VS: Uncaught TypeError: Object [object Object] has no method 'highcharts' Hse:95 (anonymous function) It is working fine in Fiddle! Does anyone has any idea how to fix this? <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> <script type="text/javascript" src="@Url.Content("/Scripts/ext/sparkline.js")"></script> <script type="text/javascript" src="@Url.Content("

Use redraw to get data from chart, Jsfiddle provided

柔情痞子 提交于 2020-01-07 05:48:10
问题 I want to add a redraw function on highchart to show a new set of data for a series, iv made the button but the code behind am struggling. HTML: <div id="container" style="min-width: 400px; height: 400px; margin: 0 auto"></div> <button id="button">redraw </button> JS: function loadA(chart) { chart.xAxis[0].update({ categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] }); chart.yAxis[0].setTitle({ text: "kHw" }); chart.addSeries({ name: 'Rainfall11',

HighCharts pie chart labels not displayed properly

折月煮酒 提交于 2020-01-07 05:26:07
问题 I have taken an example Highcharts plnkr and edited it to match my requirements. Below is the plnkr that I have developed. https://plnkr.co/edit/yzXLz7AIDoWa1Pzxxl4k?p=preview Here all the labels and icons for the labels are displayed properly. But when I include it in my application, the icons for the labels are not displayed properly. It is displayed as below My label code is as below labelFormatter: function () { return '<div class="legend-label-md row" style=" border-bottom:1px solid

How to change value of highchart graph with the other value with refresh

为君一笑 提交于 2020-01-07 05:02:13
问题 Whenever I change the old value of the highchart with a new value, the highchart still displays the old value. Each time I need to refresh before new value has been added and displayed to the highchart but I dont know why. Can someone help me how to solve this? Following is my jQuery portion of code for displaying the chart that uses the Highcharts plugin. //charts // JavaScript Document $(function() { var chart; $(document).ready(function() { $.getJSON("../php/termocouple/line_temp1.php",

Column chart with negative values and categories on xAxis in HighCharts

纵然是瞬间 提交于 2020-01-07 04:59:06
问题 Well, I'm using highcharts in web app. Here is task to show Demographical data in column chart like on image : What I have for now is just next example : http://jsfiddle.net/futw5e8k/1/ Highcharts.chart('container', { chart: { type: 'column' }, title: { text: 'Total fruit consumtion, grouped by gender' }, xAxis: { categories: ['Apples', 'Oranges', 'Pears', 'Grapes', 'Bananas'], offset: -150 }, yAxis: { allowDecimals: false, title: { text: 'Number of fruits' } }, tooltip: { formatter: function

xAxis auto label dropping has stopped working after upgrading to Highcharts 5.0.8

浪子不回头ぞ 提交于 2020-01-07 04:41:12
问题 The label looks good in Highcharts 4 but after upgrading to Highcharts 5 I started to Ellipses. The xAxis.label property looks something like this. Is there any way I can force the label to render horizontally and drop if there is not enough room for them to be rendered ? I can't use step:1 labels: { rotation: 0 } Highcharts-4 Highcharts-5 Rotation value I'm using for different Label Angle options are below: Auto - I'm using autoRatate:[-10, -20, -30, -40, -50, -60, -70, -80, -90] -- : rotate

Highcharts plotBand animation

爷,独闯天下 提交于 2020-01-07 04:40:33
问题 I have a plotband that resizes dynamically. At the moment is works by removing old one and drawing next. Is there any way to update plotBand's position parameters in the way it could animate moving? 回答1: It's not part of the API , but it's possible to update plotBand's options, demo: http://jsfiddle.net/2sqpt1aa/ Snippet: var chart = $("#container").highcharts(), // get chart plotBand = chart.xAxis[0].plotLinesAndBands[0]; // get first plotBand // Update options: plotBand.options.from = 2010;

Pass data in form of variable -Highcharts

*爱你&永不变心* 提交于 2020-01-07 04:29:06
问题 I am trying to implement high charts(pai chart) in my system where I am trying to pass the the value of data from a variable which contains the value in exact array manner that data required, alert(legend_with_values) If I am alerting this variable it returns [['agent_total_members',24],['billing_failed',0],['members_inactive',0],['members_expired',0] ] I am Passing this value to the data field like this legend_with_values; alert(legend_with_values); this alert returns [['agent_total_members'