graphael

Where does graphael (line chart) calculates it's maximum value?

爷,独闯天下 提交于 2020-01-06 13:55:13
问题 I am facing a very serious bug using graphael. Therefore, I want to change the procedure it uses to calculate the maximum value for the y axis. However, It's way to confusing for me, and I cannot find it. Can anyone help me to change that procedure? 回答1: Sorry, I don't have any experience with gRaphael, but since no one else has answered, I might be able to help you somewhat... The code for gRaphael's LineChart is located here. Normally, I would suggest overriding the function that calculates

Angle tag solutions for Graphael multiple line chart

陌路散爱 提交于 2020-01-01 19:29:10
问题 I've tried to create an multipleline chart with tag for each node. Every things ok. But some time the tags are showed not good when the values are nearly. Any one have solution for this problem. Thank! http://www.flickr.com/photos/96516997@N02/8973858413/ This is my Graphael Line Chart <script src="js/raphael-min.js"></script> <script src="js/g.raphael-min.js"></script> <script src="js/g.line-min.js"></script> <script src="http://code.jquery.com/jquery-1.9.1.js"></script> <style type="text

How do you get a y-axis that starts at zero in graphael, if none of your values are zero?

风流意气都作罢 提交于 2019-12-24 01:26:09
问题 I wish to create a graph whose y-axis starts at 0. None of my values are 0 though. How do i go about doing that in graphael ? As an extension, how can I create a graph with a y-axis whose maximum value is, lets say, twice the maximum value in the provided data ? 回答1: I don't know if this is too late but I've been struggling with gRaphael myself and came across a solution that might work for you. There's no obvious or clean way to do this but I've found a decent hack for it. You can add in

change min and max y-axis values in a raphael linechart

心已入冬 提交于 2019-12-23 04:20:52
问题 Consider the following code (sorry I was not able to put it on jsfiddle): <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> <script src="raphael.js"></script> <script src="g.raphael.js"></script> <script src="g.bar.js"></script> <script src="g.line-min.js"></script> <body> <div style="width:500px;height:150px" id="div"></div> <script> var r = Raphael("div",400,150), fin = function () { this.flag = r.popup(this.x, this.y, this.value

Update data in graphael piechart

泄露秘密 提交于 2019-12-22 10:28:29
问题 I have a pie chart created by graphael this.element = this.raphHolder.piechart(100, 100, 100, data,{legend : legende}); I want to update legend/data of this item but i don't find a solution. 回答1: It seems the best way to do this is to destroy and then recreate the graph.. 来源: https://stackoverflow.com/questions/9126018/update-data-in-graphael-piechart

How to draw a line based on mouse move using Raphael.JS

倾然丶 夕夏残阳落幕 提交于 2019-12-21 19:53:01
问题 I am trying to draw a line along with mouse move on a paper. I just know how to draw a line using path . But wanted to know if anyone have ideas to make drawing a line along with mousemove . Please help me on this. 回答1: Here a link to such example using raphael Drawing with Raphael.(Credit:Jonas). (click view->source to see how its done...) And a jsfiddle that I did just in case( just for back up ) It uses the drag and mousemove events of raphael over a rectangle element... 来源: https:/

jquery animation of specific attributes

限于喜欢 提交于 2019-12-19 17:14:12
问题 So I'm using gRaphael to create some charts. This is creating a cool bar chart line with some dots in it. Those dots have the ... nodes with x=10 y=20 as their attributes. Example rect x="135.8" y="115.8" width="8.399999999999999" height="8.399999999999999" r="0" rx="0" ry="0" fill="#ff0000" stroke="none" I want to use jquery to animate this guy if possible. The thing is if I do $("rect").click(function({ $(this).animate({ 'x':30 }); }); In order to animate the x coordenate it doesn't work

gRaphael Pie Chart : Add animation

浪子不回头ぞ 提交于 2019-12-19 10:13:47
问题 I want to display the pie chart with an animation that will make it grow from a "small point" to full size pie chart , something like this growing pie or this Highcharts Demo Gallery - Pie , but I want to apply it to a pie made with gRaphael , Here's my jsfiddle example... raphael pie chart with legend Thanks ahead, 回答1: In order to achieve that kind of animation you have to access the sectors and... animate them :) You can do this using your_pie.each() pie.each(function(){ //scale each

Why the following data produce wrong chart?

邮差的信 提交于 2019-12-13 05:13:17
问题 I am using linegraph of graphael. I have this line to produce my graph var lines = r.linechart(30, 30, 600, 440,[[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71]],[[0.03091,0.00461,0.0068,0.00144,0.00544,0.00035,0.00871,0.03117,0.02259,0.02623,0.01967,0.01967,0.00788,0.02217,0.0137,0.01237,0.01764,0.0131,0.00942,0.0076,0.01463,0.02882,0

How to add jquery click event to gRaphael graphics?

半城伤御伤魂 提交于 2019-12-12 09:43:44
问题 I made a chart using g.Raphael: $(function(){ var r = Raphael("pieChart"), pie = r.piechart(320, 240, 100, [55, 20, 13, 32, 5, 1, 2, 10]); r.text(320, 100, "Interactive Pie Chart").attr({ font: "20px sans-serif" }); $(pie.sector).click(function(){ alert('hi');//not work! }) }) Later I added the click event to pie.sector, but my event is not work... any one know the right way to handle gRaphael with jQuery? 回答1: Here you go Iterate over you pie slices and add click handler to them for(var