Highcharts

Format data for Highcharts chart

ε祈祈猫儿з 提交于 2019-12-24 18:22:12
问题 I'm trying to create Highcharts chart from mysql, I have code like this: xAxis: { categories: [<?php echo implode($column, ','); ?>] } and column has been grabbed from mysql: $column = array(); $column[] = $row['blabla']; What I am actually getting is: xAxis: { categories: [data1,data2,data3,data4,data5] } but it has to be like this: xAxis: { categories: ["data1","data2","data3","data4","data5"] } How can I format it like that? 回答1: json_encode will format your array of strings as a JSON

Trying to produce a pop up when the chart is clicked. The pop up is a close button

岁酱吖の 提交于 2019-12-24 17:29:53
问题 I'm trying to produce a pop up in highcharts when the user clicks on a bar. So far I have the code that when a user clicks on a bar it fades all the other bars. I want the bar that is selected to produce a small pop up above the bar like this when the close is selected it should highlight the bar and return all bars to normal state. Here's my code javascript $(function() { $('#container4').highcharts({ chart: { type: 'column', events: { click: function(e) { console.log(e); }, selection:

Trying to produce a pop up when the chart is clicked. The pop up is a close button

耗尽温柔 提交于 2019-12-24 17:29:24
问题 I'm trying to produce a pop up in highcharts when the user clicks on a bar. So far I have the code that when a user clicks on a bar it fades all the other bars. I want the bar that is selected to produce a small pop up above the bar like this when the close is selected it should highlight the bar and return all bars to normal state. Here's my code javascript $(function() { $('#container4').highcharts({ chart: { type: 'column', events: { click: function(e) { console.log(e); }, selection:

highcharts change chart type using dropdown for multiple series

与世无争的帅哥 提交于 2019-12-24 16:37:05
问题 hello im a newbie in this field of programming, im trying to create a chart with a drop down list to chart type. I've already tried many solutions posted here, unfortunately not finding a working one with my code. any help appreciated., here is the js fiddle link http://jsfiddle.net/hKGSK/ $(function () { var chart = new Highcharts.Chart({ chart: { renderTo: 'container', type: 'line', title: 'please select a category' }, xAxis: { categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul',

highchart with numberformat (unit)

a 夏天 提交于 2019-12-24 16:28:59
问题 I'm using Highcharts to generate a line chart. And I'm having a problem with numberFormat : var test = 15975000; numberFormat(test, 0,',','.'); the result is: 15.975.000 But I want to transform 1000 to 1k , 100000 to 100k , 1000000 to 1m like this. How can I deal with this problem? 回答1: numberFormat is available in Highcharts object. Highcharts.numberFormat(test, 0,',','.'); Example http://jsfiddle.net/DaBYc/1/ yAxis: { labels: { formatter: function () { return Highcharts.numberFormat(this

How to edit the tooltip text in a highcharts boxplot

喜夏-厌秋 提交于 2019-12-24 16:27:37
问题 I want to change the text of the popup on a box plot. From the api and the example linked there, I assumed it would be a case of adding a formatter function to the series. So I went to the demo and clicked 'Edit in jsFiddle'. I then changed: tooltip: { headerFormat: '<em>Experiment No {point.key}</em><br/>' } to tooltip: { headerFormat: '<em>Experiment No {point.key}</em><br/>', formatter: function() { return 'some random string'; } } I expected the tooltip to change to 'some random string'

Mootools Highcharts radio button toggle between charts, working jQuery version

偶尔善良 提交于 2019-12-24 16:15:12
问题 I've created a Highcharts implementation with a working jQuery-based radio button toggle "view select" between two charts: http://jsfiddle.net/6sAYF/ (it's in the lower-right) here is the working jQuery function and corresponding html: $(function() { $("[name=toggler]").click(function(){ $('.toHide').hide(); $("#0829-"+$(this).val()).fadeIn('fast'); }); }); <div id="0829-1" class="toHide" ></div> <div id="0829-2" class="toHide" style="display:none;width:780px;"></div> <label><input id="rdb1"

How do I modify the page I'm serving in node.js

寵の児 提交于 2019-12-24 15:51:56
问题 Ok, so I have my server.js var express = require("express"), app = express(), bodyParser = require('body-parser'); app.use(bodyParser.urlencoded({ extended: true })); app.use(bodyParser.json()); app.use(express.static(__dirname + '/')); app.post('/message', function(req, res) { var jsonData = req.body; if (jsonData.hasOwnProperty('phone1')) { console.log("Phone 1 is connected to", jsonData.phone1.connection, "and has a downlink speed of", jsonData.phone1.dl, "Mbps"); } else if (jsonData

TypeError: Highcharts[h] is not a function

梦想与她 提交于 2019-12-24 15:42:49
问题 My Plnkr link: http://plnkr.co/edit/S0BKjrgxz564oCPs9nCw?p=preview Any idea why I would be getting this error? Not sure where Highcharts[h] is... Controller Code (function() { angular.module('highChartTest', ['ui.bootstrap', 'highcharts-ng']) .controller('MyHighChart', ['$scope', '$timeout', MyHighChart]); // HighCharts Column Chart function MyHighChart($scope, $timeout) { var vs = $scope; ticker = 'GOOG', vs.chartObject = {}; var dayHolder = []; var count = 0; _.times(97, function() {

How can I make React Native in Android aware of a click event in a tooltip in a Highcharts chart?

瘦欲@ 提交于 2019-12-24 15:42:14
问题 I have a React Native application built with Expo. On How can I add links in a Highcharts tooltip that will open on mobile's browser? I was able to pass a URL to Highcharts so that when a tooltip is clicked, that URL is opened: return( <View style={styles.container}> <ChartView onMessage={m => this.onMessage(m)} config={config} /> </View> This triggers this method to open the URL: onMessage = (m) => { let data = JSON.parse(m.nativeEvent.data); Linking.openURL(data.url) }; And the URL gets