Highcharts

jQuery Highcharts: change chart type using dropdown list

让人想犯罪 __ 提交于 2019-12-24 00:39:37
问题 i'm trying to change the value of chart as following <!doctype html> <head> <script> var chart1; // globally available $(document).ready(function() { var chart = 'pie' $("select").change(function(){ chart = $('#chart').val(); alert(chart); }); chart1 = new Highcharts.Chart({ chart: { renderTo: 'container', type: chart }, yAxis: { title: { text: 'Temprature' } }, series: [{ name: 'mach_1', data: [<?php foreach($chart as $`row) { echo $row['temp'].","; } ?>] }] }); }); </script> </head> <body>

Highcharts: To rotate the chart 90 degree but also redraw it

守給你的承諾、 提交于 2019-12-24 00:38:01
问题 I'm trying to create a button that allows me to turn the chart from portrait orientation to landscape. So what I did is to add a class to the chart when button is clicked. transform: translate(-50%, -50%) rotate(90deg); It did but the chart went like this Rotated 90 degrees, but the chart didn't redraw to stretch full screen And this will be what I wanted, Rotated 90 degrees, and fully stretched to the bottom of the screen I wondered if there is a way to do so, by either using highchart's API

Receiving incorrect datetimes when using milliseconds for x-axis?

寵の児 提交于 2019-12-24 00:26:32
问题 Here is a link to the jsfiddle. For some reason my datetimes are showing up incorrectly as you can see below. I have confirmed that the milliseconds were correct so I'm led to believe that it's a bug with the library however I've seen examples using Date.UTC that work correctly but I can't seem to find any examples in their documentation that uses milliseconds instead. Millisecond values were: 1326113281133,1326113401128, 1326113521102, 1326113641108,1326113761129,1326113881139,1326114001156

highcharts not loading in tabs

泄露秘密 提交于 2019-12-23 22:52:20
问题 I have multiple tabs view with a component rendering in each one of them. Here is the code for that: <mat-tab-group> <mat-tab *ngFor="let g of goals; index as i"> <ng-template mat-tab-label>{{g.name}}</ng-template> <div class="row"> <app-summary [goal]="g"></app-summary> </div> <div class="row"> <mat-table #table [dataSource]="dataSource[i]"> ## some table content here </mat-table> </div> </mat-tab> </mat-tab-group> Here is what app-summary looks like: <div fxLayout="column" fxLayoutGap="20px

Pan one of multiple Y axis for highchart

风流意气都作罢 提交于 2019-12-23 22:16:59
问题 I am new to highchart javascript. And I don't have sample to show it. But I have seen a chart has two Y Axis, left and right. I can drag up and down one of the axis without affect the other axis. This chart might have a few series data over it. I have seen plugin built: http://www.highcharts.com/plugin-registry/single/27/Y-Axis%20Panning and this http://jsfiddle.net/uLHCx/ which uses this code $(chart.container) .mousedown(function(event) { mouseY=event.offsetY; yData=chart.yAxis[0]

How to dynamically change axis from linear to logarithmic in HighChart

好久不见. 提交于 2019-12-23 21:47:47
问题 I want to dynamically change axis from linear to logarithmic and vice versa in HighCharts. Please see this fiddle example. yAxis: { //linear type: 'logarithmic', minorTickInterval: 0.1 }, There is a type: String in api For initial declarative chart setup. I want to dynamically change to logarithmic/linear back and forth. 回答1: Use axis.update , see: http://jsfiddle.net/ZCecV/1/ (docs: http://api.highcharts.com/highcharts#Axis.update() ) 来源: https://stackoverflow.com/questions/16324284/how-to

Highcharts: Cannot read property 'parts/Globals.js' of undefined

断了今生、忘了曾经 提交于 2019-12-23 19:43:46
问题 I am using certain libraries from Highcharts and I get the following error: Uncaught TypeError: Cannot read property 'parts/Globals.js' of undefined at map.src.js:31 at map.src.js:22 at map.src.js:11 How can I fix this? I am using: <script src="https://code.highcharts.com/maps/modules/map.js"></script> 回答1: Faced the same issue. Highcharts released a new version 7.1.0 two days back. They have fixed an issue(10232) which is causing this error. You can use https://code.highcharts.com/5.0.14

Need to apply background color to each legend text highchart

我的未来我决定 提交于 2019-12-23 19:25:33
问题 As I stated in my question, I am looking to change my legend some like : FROM: TO I have tried this for background color: legend: { backgroundColor: '#CCC', layout: 'horizontal', floating: true, align: 'left', verticalAlign: 'top', x: 60, y: 1, shadow: false, border: 0, borderRadius: 0, borderWidth: 0 }, But No luck As you can see I have to achieve 1. background colors to be applied to text . 2. And the text should be appended with 'BY TIME'. Fiddle Demo Hope you guys help me, please ask if

Highcharts 3.0, area chart with stacked and unstacked series - how to fix?

ε祈祈猫儿з 提交于 2019-12-23 18:14:37
问题 I have a complex area chart, which uses some stacked and some unstacked series. Prior to version 3, everything worked fine. With version 3, there are some odd buggy behaviors, in both firefox and chrome: Example here: http://jsfiddle.net/jlbriggs/yj3FP/ stacking:'normal', If I disable stacking, everything looks as expected. But I need stacking. So, if you comment out the 'stacking:normal' line, you will see the chart as it should be, except for the stacking part... In the example linked to

event.ctrlKey works in IE and Chrome but not Firefox on legendItemClick

ⅰ亾dé卋堺 提交于 2019-12-23 17:23:20
问题 Built a feature that deselects all but the ctrl-clicked item. It works fine in IE and Chrome, but not in Firefox. Try the jsfiddle at http://jsfiddle.net/PJVK3/ Tried to capture the same event with simple javascript code and the same problem occurs. This works in Chrome(24.0.1312.57) and IE(9), but not Firefox(18.0.2): <!DOCTYPE html> <html> <head> <script> function myFunction() { if (event.ctrlKey){document.getElementById("demo").innerHTML="ctl key pressed";} if (!event.ctrlKey){document