Flex :: Calculate Start And End Angle Of Piechart Slice?
Jul 18, 2009In Flex 3 how to calculate start and end angle(point) of every pie chart slices?
View 1 RepliesIn Flex 3 how to calculate start and end angle(point) of every pie chart slices?
View 1 RepliesI have this code :
var a:Apoint = new Apoint();
a.x =0; a.y=200;
addChild(a);
var b:Bpoint = new Bpoint();
b.x =275; b.y=100;
[Code]...
I have a rectangle A which does not rotate / move. I place movieclips having image B in A. Now I rotate this movie clip B.When the width / height of movieclip B with image is equal to width / height of A, then on rotating B some of the part come out of the A. hit test will not work in my case.solution to stop rotating B when it crosses A.
View 7 RepliesHow can I calculate the angle of a 3d object based on the mouse speed?I want to change the rotationZ state based on the mouse position.
View 0 RepliesIf I had an XML data like this:
<data>
<recored id='1'>
<node1>something</node1>[code]..........
and I want to use a pie chart where my dataprovider is set to the sub node "per" in "node 2" how can I go back up and set the nameField to "node1" ?
Adobe's docs describe how to apply an outline to the pie chart by using the mx:stroke element within a PieSeries, however this only changes the border of the entire chart.
How do I add a border around each of the wedges in the chart?
Is it possible to style the string returned from the labelFunction so I can change color and font of the callout (inside)? Or some other way? (It seems like a big limitation to have that only return a string that is unstylable.)
View 1 RepliesI have a form in which i add two dates
Start date
End Date
I want to know how i validate that the selected start date is always less than end date(actually an expiry date).
Is it possible to trigger Flex Piechart Item click event when a Datagrid Item is clicked.If so can anyone give some example.
View 3 RepliesHow would I get a range of items from my xmllist similar to the slice method for an array?
slice(startIndex,endIndex);
I am trying something like this:
var tempXMLList:XMLList = new XMLList();
[code].....
Is there a way to use 9-slice scaling with images loaded at runtime? To clarify, let's say that I build an application that lets a user skin a button with whatever image they want. This would be an image that's not embedded with the swf. Is there a way to set that runtime image as a background and use 9-scaling?
View 1 RepliesI am creating a program where a change in a value causes the color of a pie slice in an mx:PieChart to change dynamically.the code that is supposed to change the color is similar to this:(pieChart.pieChartSeries.items[i] as PieSeriesItem).fill = new mx.graphics.SolidColor(0,0.2); // black, almost opaquetracing out the results of this appears to apply the color to the particular PieSeriesItem, but the color does not change visually. I checked the AS reference and the fill property is of type iFill and should accept a solidColor instance. (note: I have also tried 0x000000 as a valid color, the first argument of SolidColor takes an uint)edit] Since I posted the question originally, I've added a few changes to clarify the question. am actually using an MXML component that extends < mx:PieChart > . Originally I was trying to set the color as listed above within an event handler in the main application. What I have done since then was invoke a method in my extended PieChart component, like so:
(in main applicaion)
private function someEventHandler(evt:someEvent):void{
pieChart.setPieSliceColor((pieChart.pieChartSeries.items[i] as PieSeriesItem));
[code]......
Only succeeded with applying it around the whole pie chart.
View 2 RepliesI wanted to e to replace the standard flex bar chart bars with my own image. This worked by embedding the image and setting as a bitmapfill. however these images dont scale well even tho i have applied 9 slice scaling when embedding.
[Code]...
Ive made this rotation with AS. But Id like to make the bar to move from angle A to angle B smoothly.
How can I do this?
I as this working in AS2 and need to update to AS3...shows that AS3 doesn't like sloppy coding. Here's what I need: I pull data from an XML and that works when I put the data into a dynamic text box. However, I can't seem to get the date of birth into a variable. I have some code that calcs age in years but uses a string literal that I thought I could just replace with a variable from my XML...ain't a workin'. Here's the code I have:
ActionScript Code:
import flash.display.*;
import flash.text.*;
import flash.events.*;
[Code]......
I'd like my text to be positioned on a 45 degree angle. Is there an easy way to do that? (In the worst case, I could always make a png out of the text). But, I hope that there's away to do it in Flex. I don't need an animated effect.
var angleText:Text= new Text;
angleText:Text.text = "My text is angled!"
angleText:Text.x= 200;
angleText:Text.y= 300;
i'm getting the xmldata from the httpservice (using cgi) and i have not set resultformat(it is coming as an object only),the xml data in this format
[Code]...
when i was tried to count the employee tag,i getting the problem, my code will like this:
[Code]...
I have this datagrid which has columns with a NumericStepper as an itemEditor where the user can change the number of items he wants to buy. How can I calculate the sum of all cells when the user updates datagrid's values?
EDIT 1
My datagrid is about colors and sizes of a product. The columns are generated dynamically from this function
private function getColumn(dataField:String, headerText:String,editable:Boolean) : DataGridColumn
{
var column:DataGridColumn = new DataGridColumn(dataField);
[Code]....
the row.size28 is generated dynamically. So it could be row.size29,row.size30 etc.
How can I loop through all my cells without knowing their data.property?
I have many dropdowns in my flex application. Now I want to set rowCount property so that as many rows as possible so there is less scrolling when see the dropdown items.The flex application was running on a popup window. So I think I have to know the distance from dropdown to bottom border of window, and then calculate what number should be for the rowCount. Like Height/per row height.As I known, the dropdown.y is the relative y coordinate of itself. But my dropdown has many parent UI layout component, and also I have many dropdowns, it is hard to calculate one by one.
View 1 RepliesI am building a scheduling system. The current system is just using excel, and they type in times like 9:3-5 (meaning 9:30am-5pm). I haven't set up the format for how these times are going to be stored yet, I think I may have to use military time in order to be able to calculate the hours, but I would like to avoid that if possible. But basically I need to be able to figure out how to calculate the hours. for example 9:3-5 would be (7.5 hours). I am open to different ways of storing the times as well. I just need to be able to display it in an easy way for the user to understand and be able to calculate how many hours it is.
View 2 RepliesI have three datagrids inside VBox container. Since I don't want scrollbar in my flex widget i am increasing the height of SWF through javascript, which increases with each addition of row in my datagrid. My query is how can I get the exact height of my VBox which is the parent element of datagrid. I am not able to get the height of VBox. I have tried to use measuredHeight,height with no success.
View 1 RepliesI am developing an application in flex in which I need to calculate checksum of different files. I would like to know if there is a direct method in actionscript to calculate that or do I have to go for any external libraries?
View 2 RepliesI have this <s:list> with an itemrenderer and arraycollection as dataprovider. Now my problem is I want to be able to drag and drop to reorder those items. To do so I need to know the dragged item index, and the drop location. I have the selected item index but when I want to calculate my drop location using this code in my dragcompletehandler()...
[Code].....
How I can calculate packet loss from Flex.
View 1 RepliesHow I can calculate packet loss from Flex.
View 1 RepliesI have two rectangles: var rect1:Rectangle = new Rectangle(66,147,89,67);
var rect2:Rectangle = new Rectangle(155,147,89,67);
How to calculate the centre point of these rectangles based on their x and y positions. I want the centre point to be calculated with relative to stage
I want to create a text box with a fixed width that will fit itself to its current text. So I went ahead and wrote this simple application[code]...
View 2 RepliesHow can i find line number in events like mouse clicked, key down and key up. And also highlight that line with color. I used TextArea.
View 1 RepliesI am trying to use .slice() to copy an Array of Loaders (each with a jpg loaded in it), as follows:
newArray = oldArray.slice();
and it works, but the problem is, any changes I apply to one Array applies to both, as though .slice() had just copied a pointer to the same Array, but I was specifically told that .slice() would not exhibit that pblm. Before I just go back to loading the same images twice, is there something special about Arrays of Loaders or something else I might be missing?