flot

jquery flot, varying size and color for each point

一笑奈何 提交于 2020-01-01 09:29:53
问题 Can we change the following properties of the points in a jquery flot plot: the size of dots : I am basically trying to plot a three dimensional graph. First two dimensions are the x and y values and the third dimension value will be reflected in the size of the points. Larger the value, larger the point. the color of the dots: Again, am trying to display a property other than the x and y values. larger the value, darker the point. [EDIT] : I am trying to control these properties for points

How to control screen-orientation for iPhone in web app

蓝咒 提交于 2020-01-01 05:33:07
问题 I have a very basic web page that uses flot to create a canvas based graph (similar to what SO uses for reputation graph). In the case of a PC display, it should simply output normally, with a the width (x-axis) being 1.6 times the height. But for iPhones, I would like it if, rather than having it overflow in "portrait" orientation, the page defaulted to landscape orientation, encouraging (or forcing) the user to turn their phone to see the chart as PC users would. So my questions are: 1) Is

Flot charts, xaxis minimum length

可紊 提交于 2019-12-31 05:39:05
问题 The xaxis in my flot line charts can take an array of data up to but no more than 16 in length. The problem is when my data is less than 16, the x axis is spreading out to show the maximum value of whatever the length of the data array is. Even if my data is say 4 in length, i'd still like to show 16 points on the xaxis. I have tried various configs and nothing seems to be working :( http://www.discussthemarket.com/ratings/ The graphs lower down have an x axis greater than the graphs nearer

jQuery Flot line chart with month,year in x-axis

断了今生、忘了曾经 提交于 2019-12-30 07:21:11
问题 I'm trying to generate a graph with month,year in x-axis. Please check below for ex: The data for the graph is obtained via ajax. Please check below for sample json: {"total":[[2013,4,0],[2013,5,0],[2013,6,0],[2013,7,0],[2013,8,0],[2013,9,0],[2013,10,475],[2013,11,0],[2013,12,0],[2014,1,367],[2014,2,0],[2014,3,0]],"critical":[[2013,4,0],[2013,5,0],[2013,6,0],[2013,7,0],[2013,8,0],[2013,9,0],[2013,10,0],[2013,11,0],[2013,12,0],[2014,1,1],[2014,2,0],[2014,3,0]],"high":[[2013,4,0],[2013,5,0],

Empty PDF report is generated when we have multiple graphs using html2canvas and jsPDF library

匆匆过客 提交于 2019-12-29 09:08:05
问题 I have two flot charts in One page , and with the code below, I want to use jsPDF to create report of them in two different pages (but one PD file) here id my code: Lets use this sample graphs : function flot1() { var oilPrices = [[1167692400000, 61.05], [1167778800000, 58.32], [1167865200000, 57.35], [1167951600000, 56.31], [1168210800000, 55.55], [1168297200000, 55.64] , [1168383600000, 54.02], [1168470000000, 51.88], [1168556400000, 52.99], [1168815600000, 52.99], [1168902000000, 51.21],

Empty PDF report is generated when we have multiple graphs using html2canvas and jsPDF library

£可爱£侵袭症+ 提交于 2019-12-29 09:08:02
问题 I have two flot charts in One page , and with the code below, I want to use jsPDF to create report of them in two different pages (but one PD file) here id my code: Lets use this sample graphs : function flot1() { var oilPrices = [[1167692400000, 61.05], [1167778800000, 58.32], [1167865200000, 57.35], [1167951600000, 56.31], [1168210800000, 55.55], [1168297200000, 55.64] , [1168383600000, 54.02], [1168470000000, 51.88], [1168556400000, 52.99], [1168815600000, 52.99], [1168902000000, 51.21],

JavaScript charting library to handle shading area between two lines

时光毁灭记忆、已成空白 提交于 2019-12-29 09:02:47
问题 I'm looking for a JavaScript charting library that supports shading the area between two lines. ChartDirector handles this quite nicely (see: http://www.advsofteng.com/gallery_line2.html - Inter-line Coloring), but I require a more interactive charting library. I've looked into various JavaScript libraries. Flot and Highcharts come close, but still have their limitations: Flot supports shading between two lines using the fillBetween plugin, but it does not support shading with multiple colors

I would like json_encode in PHP to return a JSON array even if the indices are not in order

吃可爱长大的小学妹 提交于 2019-12-29 06:09:20
问题 but according to this: http://www.php.net/manual/en/function.json-encode.php#94157 it won't. I'm using flot so I need to have an array with numeric indexes returned but what I'm getting is this: jsonp1282668482872 ( {"label":"Hits 2010-08-20","data":{"1281830400":34910,"1281916800":45385,"1282003200":56928,"1282089600":53884,"1282176000":50262,"1281657600":45446,"1281744000":34998}} ); so flot is choking. If I var_dump the array right before I call json_encode it looks like this: array(7) {

I would like json_encode in PHP to return a JSON array even if the indices are not in order

让人想犯罪 __ 提交于 2019-12-29 06:08:12
问题 but according to this: http://www.php.net/manual/en/function.json-encode.php#94157 it won't. I'm using flot so I need to have an array with numeric indexes returned but what I'm getting is this: jsonp1282668482872 ( {"label":"Hits 2010-08-20","data":{"1281830400":34910,"1281916800":45385,"1282003200":56928,"1282089600":53884,"1282176000":50262,"1281657600":45446,"1281744000":34998}} ); so flot is choking. If I var_dump the array right before I call json_encode it looks like this: array(7) {

display x-axis and y-axis lines with out the grid lines using flot

大兔子大兔子 提交于 2019-12-28 02:59:24
问题 I am using flot to display bar charts. When I set the tickLength to 0, it hides the vertical and horizontal lines but it also hides the x-axis and y-axis lines. I need the x-axis and y-axis with out the vertical and horizontal grid lines. Is there a way to do this? Please see the second chart in the image. That is what I want. 回答1: This trickier than I thought it would be. The only thing I can come up with is to disable the border and axis lines, than add them back in manually: $(function() {