Draw rectangle with dashed border in flex ?
There is no built-in method for this in the drawing API unfortunately. You can Google for some workarounds like this one:
http://www.getw3help.com/2009/10/dashed-rectangle-border-in-flash.html
Hopefully helps,
Rob
Personally, if you're using Flex4, I would create a new Skin for whichever component you're trying to style (or just BorderContainer if you just want a blank rectangle). And from within the skin, I would pogrammically add the 4 dashed lines.
Related
Im trying to add border like in the image to flex charts. I used vertical and horizontal Axis renderers but that method id not proper solution. Guys do you have any idea to achieve this one?
Just put it inside a canvas and give it that colour and required padding.
I have a world map image. I would like to place a SQUARE GRID over the entire map. I would like each square (cell grid) to change via mouseover with a border color change and background color change.
The grid needs to be layered over the map, transparent except the borders (which is the grid).
Can I achieve this using CSS or there a better way to do this?
Many thanks.
Erik
I'd suggest using a CSS grid framework as an easy way to produce the grid layout. I'd go for this one as you can easily use create a grid with 0px gutters.
You will need to modify the CSS to make the grid absolute positioned so it sits over the top of your map.
Each element in the grid is a DIV so you can easily attach Javascript events to each one to allow users to control the map. If it's a simple colour change on hover then just use css.
You can make the grid transparent using css too: http://css-tricks.com/css-transparency-settings-for-all-broswers/
how can i get a title window with all rounded courners, so that i may make it whole round or circular shape ?
i want shape like circle..
set the property: cornerRadius
default is 4
A couple of possible approaches:
If you are using Flex 4 (spark TitleWindow as opposed to the halo TitleWindow) you can create your own skin and assign that skin in CSS. In your custom skin you can draw the background however you want, including an Ellipse set to the width and height of the TitleWindow.
If you don't want to create a skin, or you are using a halo TitleWindow, you can create a circular mask and set it as the mask property on the TitleWindow. The downside to this approach is that you will probably clip the title and the close button (if it is visible), not to mention the contents as well.
Hope that helps, let me know if you need more details on either of these approaches.
How can I create a rounded rectangle with a dashed line? I've seen several routines that draw their own straight lines, but nothing for rounded rectangles.
There used to be (probably still is) a great AS 2/3 library for this but I can't find it.
This looks pretty promising:
http://blog.alegitimatebusiness.com/2007/11/07/as2-as3-draw-a-dotted-rounded-corner-box/
So I have extended the PlotChart that comes with Flex to have the ability to draw trend-lines. To do this, I have to get pixel positions. How can I convert (100px,100px) in pixels to a point on the graph, such as (0.7,1.0)?
You can draw on charts using the CartesianChartCanvas, here is the link to the LiveDoc: Drawing on Chart Controls
To answer your question more specifically, CartesianChartCanvas supports drawing by pixels.
You probably want to create a subclass of ChartElement, and add it to annotationElements for your chart. The docs for Flex 2 show an example: Livedocs
PlotSeries::dataToLocal(...) ended up working fine.