graphael

How do I change this Raphael drawn pie chart, so that the colors dont change

℡╲_俬逩灬. 提交于 2019-12-12 05:38:37
问题 I'm trying to change this pie chart, so that when I click on a segment, the color of the different segments don't change. I see that the fill has a direct relationship with the shape of the segment, but I totally suck. Please help! You can see the pie chart in action here: http://raphaeljs.com/growing-pie.html function drawgrowingpie () { var r = Raphael("holder"); r.customAttributes.segment = function (x, y, r, a1, a2) { var flag = (a2 - a1) > 180, clr = (a2 - a1) / 360; a1 = (a1 % 360) *

how can i add click evet to my rapahel pie chart?

旧时模样 提交于 2019-12-12 04:15:47
问题 How can I add click event to my Rapahel pie chart ? var r = Raphael("holder-1",340, 185); pie = r.g.piechart(150,85, 75, values , {legend: labels, legendpos: "east"}); i got the answer it is pie.click(function () { }); can i pass value to the onclick event ?, here can i pass values and labels to onclcik function ?? 回答1: According to the docs for the node attribute, you should just be able to attach events as you would any DOM element using it: pie.node.onclick = function () { /* Something */

How do I add custom HTML in Rally sdk 2.0?

家住魔仙堡 提交于 2019-12-11 10:52:07
问题 I'm creating an app with some custom gauges using Rally SDK 2.0. This requires some custom HTML. I took a rake-compiled app.html file from the examples as a starting point. Using JustGage for my gauges. Here is my launch function. launch: function () { var info = this.getStoriesForProject(); //Gets some aggregate info $('#header label').html(info.Title); var g = new JustGage({ id: "devgauge", value: info.DevPercent, levelColors: ['#f80404', '#f8f804', '#50ed0e'], min: 0, max: 100, title: "Dev

Can not find element in postlink of directive creation in angularjs

懵懂的女人 提交于 2019-12-11 08:27:37
问题 I am trying to create a directive for JustGauge in AngularJS. My html view is something like this: <div id="guageContainer" class="row" ng-controller="guageCtrl"> <gauge ng-repeat="ind in indicators" model="ind"></gauge> </div> and my directive is: angular.module("pgHome", []) .directive("gauge", function ($compile) { return { restrict: "E", scope: { model: "=model" }, compile: function (tElement, tAttrs, transclude) { tElement.append('<div id="{{model.Name}}"></div>'); return { post:

Update data in graphael piechart

旧街凉风 提交于 2019-12-05 21:01:40
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. 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

Angle tag solutions for Graphael multiple line chart

别说谁变了你拦得住时间么 提交于 2019-12-04 19:54:56
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/css"> .block { text-align: center; background: #c0c0c0; } .block:before { content: ''; display: inline

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

﹥>﹥吖頭↗ 提交于 2019-12-04 14:45:51
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. 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://stackoverflow.com/questions/10975886/how-to-draw-a-line-based-on-mouse-move-using-raphael-js

Weird chart maximum axis x value (Real Challenge)

∥☆過路亽.° 提交于 2019-12-04 06:15:48
问题 Here you can see a chart created using graphael. http://jsfiddle.net/aNJxf/4/ It is shown with it's y axis correctly. The first y value is 0.03100 and the maximum value at y axis is at 0.031 If we change the value to 0.03104 the maximum value at y axis becomes 1.03 and now all our points are in the bottom. If we add another 0.00001, which makes that value 0.03105, the maximum at the axis y becomes 0.531 and now our points are shown at the wrong position of the chart. It seems that something

How to avoid overlapping of Rapahel js path

只谈情不闲聊 提交于 2019-12-02 19:51:00
问题 I have a flow chart which is based on Raphael js. it is same as that of http://raphaeljs.com/graffle.html. however since i have many rectangular Raphael boxes and my line path is of straight line and NOT curvy as shown in the above example. In this straight line type, these lines overlap sometime and so it is hard to tell which one is connecting which boxes. Please let me know if i can achieve this and how. Update :Attaching my current flow diagram jpeg. as you can see that connector lines

How to avoid overlapping of Rapahel js path

北战南征 提交于 2019-12-02 07:39:55
I have a flow chart which is based on Raphael js. it is same as that of http://raphaeljs.com/graffle.html . however since i have many rectangular Raphael boxes and my line path is of straight line and NOT curvy as shown in the above example. In this straight line type, these lines overlap sometime and so it is hard to tell which one is connecting which boxes. Please let me know if i can achieve this and how. Update :Attaching my current flow diagram jpeg. as you can see that connector lines are crossing over the Raphael shapes and also it is very hard to tell from where lines are starting. 来源: