flot

Gradients on Flot

做~自己de王妃 提交于 2019-12-03 15:16:51
How can I set gradient effects on pie charts? [{ label: i, data: 1000, color: [ "rgb(190,110,110)", "rgb(140, 70, 70)", "rgb(110, 50, 50)", "rgb(60, 10, 10)" ] }, //nextserie ] doesn't work. Also how can I set gradient effects as default colors for my charts? In the way you can index it by number like: [{ label: i, data: 1000, color: 1, }, //nextserie ] I have now added support for rendering pie chart with gradients, either radial or linear. My commit is referenced in pull request #853 . An example "default" pie chart with a radial gradient: $.plot($("#default_gradient"), data, { series: { pie

How to render this bar chart with flot

不想你离开。 提交于 2019-12-03 13:17:43
Can you render a bar chart like this using flot? Do I need to create the dataset manually to get this result, instead of using mode: 'time' ? Actually pretty easy to produce using flot. var options = { series: { bars: { show: true, barWidth: 15778463000, // 1/2 year in milliseconds align: 'center' }, }, yaxes: { min: 0 }, xaxis: { mode: 'time', timeformat: "%y", tickSize: [1, "year"], autoscaleMargin: .10 // allow space left and right } }; $(function() { $.plot($('#placeholder'), [[[1230768000*1000, 100], //[seconds * 1000 = milli, y value] [1262304000*1000, 200], [1293840000*1000, 300]]],

jquery flot bar chart multiple series

China☆狼群 提交于 2019-12-03 11:58:12
问题 in order to make things easy to undertand i'm providing the code: http://jsbin.com/otaruq what we have here is a data set like this: (look the source for more) "label": "scott", "data": [[1317427200000, "17017"], [1317513600000, "77260"]] where the first value is a date in UTC format and second should be score. now, what i'm trying to do is to have for each date in the y axis the bars representing the score side by side, like below: 3 | # # 2 | # # # # # # 1 | # # # # # # # # # 0 |___________

Tooltip for flot bar chart

社会主义新天地 提交于 2019-12-03 10:01:15
i am using flot API to build bar charts. I am successful in plotting bar charts.But i am not getting tooltip for those charts.I have tried alot but i failed to achieve this. My code is: $(function () { var a1 = [ [0, 100], [1, 200], [2,300], [3,400], [4,500] ]; var a2 = [ [0, 90], [1, 150], [2,250], [3,380], [4,450] ]; //var ticks=[[0,"Overall"],[1,"SEA"],[2,"INDIA"],[3,"NEA"],[4,"PZ"]]; var data = [ { label: "Pre Transformation", data: a1 }, { label: "Post Transformation", data: a2 } ]; $.plot($("#placeholder2"), data, { series: { bars: { show: true, barWidth: 0.13, order: 1 } }, xaxis: {

How to catch the click event from the axis ticks jqplot, highcharts,flot

时光毁灭记忆、已成空白 提交于 2019-12-03 09:54:09
I want to be able to catch the clicked event that is hooked to all the axis ticks. here is what i have done so far. http://jsfiddle.net/grVFk/5074/ If anyone knows how to do that with any of the charting plugins can kindly share. thanks the plot isn't plain HTML. So there is no a tag. And the plot itself do not provide you with an api to catch the click event on an axis tick. What you can do is to select the axis tick manually with jQuery and add a click event: $('.highcharts-axis tspan').each(function(){ var label = $(this), value = label.text(); if(categoryLinks[value]) { label.click

Put only integers in x and y axis of bar and line graphs - Flot

情到浓时终转凉″ 提交于 2019-12-03 09:39:01
In Flot.js, bar graphs and line graphs have numbers as the coordinates in the x and y axis by default. How can you make the coordinates such that the numbers are only integers or at least only the integers are visible? Check out the minTickSize option from the documentation : Alternatively, you can specify that you just don't want ticks at a size less than a specific tick size with "minTickSize". So in your graph options, you would specify it like this: $.plot($('#placeholder'),data,{ //your options, xaxis: { minTickSize: 1 } }); See it working here: http://jsfiddle.net/ryleyb/g2CTz/ Looks

Flot Stacked Bar Chart and displaying bar values on mouse over

对着背影说爱祢 提交于 2019-12-03 08:29:31
问题 I'm trying to understand the tooltip functionality of Flot but not really getting my head around it! I am trying to achieve a tooltip that displays the label and value of each section of a stacked bar chart Would someone be able to point my towards an example of this or provide code for doing so? 回答1: The following code works for my Flot stacked bar chart, based on the Flot example that shows data point hover. The trick is that the 'item' values in the stacked chart are cumulative, so the 'y'

Gauge chart in Javascript or jQuery Flot [closed]

女生的网名这么多〃 提交于 2019-12-03 07:09:12
I'm trying to get a graph that looks like a gauge. I am already using jQuery Flot for my other charts, so is it possible using Flot or plain Javascript? Can someone help me getting started coding this? Here it is only using base flot and a background image: // consts var minCord = {x: -60, y: -57}; var maxCord = {x: 60, y: -60}; var radius = 90; $(function() { // some calculations var startAngle = (6.2831 + Math.atan2(minCord.y, minCord.x)); var endAngle = Math.atan2(maxCord.y, maxCord.x); var degreesSweep = (-endAngle) + startAngle; var positionOnArc = function(magnitude){ var numDegrees =

Axis label in Flot

南楼画角 提交于 2019-12-03 04:53:53
问题 Does anyone know how one can set the label or title of an axis in Flot? I've read the API but it doesn't seem to have that feature... Thanks :) 回答1: There are none built-in to flot. Your best bet is to do it yourself via positioned divs, but if you are adventurous, you can look at the issue (Or the original issue) and see how other people have dealt with it. Specifically, there are two people who have recently made label-related revisions to flot: https://github.com/RuiPereira/flot/raw

Jquery Flot pie charts show data value instead of percentage

那年仲夏 提交于 2019-12-03 01:20:02
I can't figure out how to get flot.pie to change the data shown in the labels from a percentage of the "raw data" to the actual data. In my example i've created a pie chart with the numbers of read/unread messages. Number of read messages: 50. Number of unread messages: 150. The created pie shows the percentage of read messages as 25%. On this spot i want to show the actual 50 messages. See image below: The code i used to create the pie: var data = [ { label: "Read", data: 50, color: '#614E43' }, { label: "Unread", data: 150, color: '#F5912D' } ]; And: $(function () { $.plot($("#placeholder"),