Highcharts

Django - 'SafeText' object has no attribute 'get'

随声附和 提交于 2019-12-13 22:14:39
问题 I'm trying to display a chart with help of Highchart by following this solution: Passing Django Database Queryset to Highcharts via JSON But I keep getting this error: 'SafeText' object has no attribute 'get' Which I have been trying to find for days. Still new to this and appreciate your help, folks! EDIT Django: 1.10 Python: 3.6 views.py class ChartData(object): def check_valve_data(self): data = {'member_no': []} people = Member.objects.all() for unit in people: data['member_no'].append

HighCharts and PHP json_encode. Data from MySQL. No data on chart

跟風遠走 提交于 2019-12-13 22:00:20
问题 Trying to produce HighCharts with data from MySQL. Parsing data from MySQL using PHP and the json_encode function. Problem: No data on chart. This is my javascript: <!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Highcharts Example</title> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> <style type="text/css"> </style> <script type="text/javascript"> $(document).ready

Updating spline chart two lines on top of eachother

 ̄綄美尐妖づ 提交于 2019-12-13 21:02:50
问题 I am showing two lines in a single graph updating them each second with a value that is saved into a global variable (both have different global variables). An example of the code can be found here: jsFiddle example. As you can see the two lines are on top of each other, even though they have different values when the ymin and ymax are added to the lines (you can see this in the console). The cause appears to be in the first addPoint call (line 118). If the first boolean is set to true (like

aligning datalabel to top of column highcharts

社会主义新天地 提交于 2019-12-13 20:46:52
问题 I'm trying to get my datalabel inside the column to the top if the column is going up or to the bottom if the column is going down right now with this code its aligned to the left in the middle. plotOptions: { series: { stacking: 'normal', dataLabels: { align: 'top', enabled: true, formatter: function() { return this.y.toFixed(2) +' %'; } } } }, How would I do this? Also if the column displayed by highcharts isn't as wide as the text, how would I check for that and put the text over the

Alternate for highcharts-more

梦想与她 提交于 2019-12-13 20:28:54
问题 As per npm highcharts-more.js is deprecated and we just need to import respective modules from the highcharts folder. But when I try to remove highcharts-more dependency I am getting error. We are trying to build a boxplot using react-highcharts v16.0.2. I even tried removing highcharts-more.js import from their demo and see that it fails. Am i missing anything in the implementation aspect here ? 回答1: Import required dependencies as import ReactHighchart from 'react-highcharts'; import

Creating 100% stacked area graph for a website

断了今生、忘了曾经 提交于 2019-12-13 20:06:35
问题 I am trying to add a chart to my website showing how income earned is divided between two parties. It is essentially the 100% stacked graph in excel that would look something like: Is there a good (ideally inexpensive, since the only one I've found that might do it is Highcharts, which looks great but it's not cheap for what we are doing) tool that we could embed into our website? Ideally it would be great if the user could select a certain price and it would show the percentage below for the

HIghcharts & Bootstrap: Chart on Tab 2 is not appearing. Though First chart is working fine

╄→гoц情女王★ 提交于 2019-12-13 19:35:17
问题 I am working on Highcharts. I also used Bootstrap for tabs. I have two charts, and each one of the chart I want to show in the different tab. Somehow I am getting correct first chart in the first tab. But second tab is empty. Please find below my code. HTML <div class="container"> <ul class="nav nav-tabs"> <li class="active"><a data-toggle="tab" href="#home">Quarterly</a></li> <li><a data-toggle="tab" href="#menu1">Waterline</a></li> </ul> <div class="tab-content"> <div id="home" class="tab

add event to x-axis labels of bar highchart

。_饼干妹妹 提交于 2019-12-13 18:51:43
问题 I am trying to retrieve the text of a label on the char x-axis by clicking on it. I am using bar chart and the code is the following: var chart = new Highcharts.Chart({ chart: { type: 'column', backgroundColor: '#eaedf1', zoomType: 'x', renderTo: 'container' }, plotOptions: { series: { cursor: 'pointer', pointWidth: 10, point: { events: { click: function (event) { console.log(event.point.name + " " + this.y); } } } } }, title: { text: 'Total Flow Types' }, xAxis: { type: 'category', labels: {

Using Moment to output Date.UTC() object for HighCharts?

寵の児 提交于 2019-12-13 18:32:07
问题 I know that Highcharts can take Unix Offset time natively, but it's more readable to pass it a Date object: Date.UTC(2003,8,25) Is there any way for Moment.js to output this exact object? var momentDate = moment.utc([2003, 08, 25]); var JSDate = momentDate.toDate(); //Not sure where to go to actually output Date.UTC(2003,8,25) 回答1: I think there may be some confusion as to the functionality of Date.UTC . Date.UTC() does not return a Date object. It returns the number of milliseconds between a

Draw rectangle in the selection, Highcharts

随声附和 提交于 2019-12-13 18:28:42
问题 I want to draw rectangle or square in selection area to show the selected xAxis min, max and yAxis min max in highchart. Thanks in Advance 回答1: This is what you need: http://jsfiddle.net/meFgf/ 回答2: Explaining @igor-shastin's example... Set zoomType to "xy" Add a rect to the chart with 0 dimensions and hang onto the reference In the selection event: Grab the event.xAxis[0].min and .max ; same for .yAxis Update the rect coordinates so it renders where the selection was made Return false and/or