I’ve got a backlog of Flex 2 samples I’ve been tinkering with over the past few months that I haven’t really had the time to polish up enough to post here. But I’m going to be taking a long overdue vacation soon, and I don’t know when I’ll get a chance to really finish them. So rather than let them quietly rot in the corner, I’m going to just put them up in their current state and slap a big old Caveat Emptor sign on them. So please don’t judge me too harshly based on the quality of the code…

First up is a little chart Sampler pack that I put together a while back. Take a look here.

27 Responses to “Samples Blast: part 1, Chart Sampler”

  1. deng Says:

    cooooooooooool!

  2. Chris Says:

    Looking great man, thanks alot for demo.quietly… really gives good insight to whats in store for us ^^ cant wait to see flexy running on a nice multi-input touch screen.

  3. Michael Schmalle Says:

    That is great stuff Ely!

    How long did it take you to optimize the code for that stuff? Or was it basically just writting good code and the player is just lightspeed these days?

    I havn’t even got a chance to extend ONE chart yet, can’t wait to get into that stuff!

    Peace, Mike

  4. Michael Schmalle Says:

    Oh yeah, don’t judge…?

    Do you have an artist’s insecurity complex also ;-)

    That sample is insane! Take it for what it is, awsome.

    Peace, Mike

  5. Rostislav Siryk Says:

    Ely, these samples are very good. And they can be even better if you implement something like deep linking there.

    What deep linking is for in this case?

    Now I’m writing email to my manager about different Flex 2 purchasing options and I try to prove him that we should buy Flex 2 Builder with Charting, no less. So i want to show him some attractive examples of how flexible charts can be. Here I’ve got some troubles: link to Chart Sampler leads to app with almost empty screen so I’m asking him to experiment with menu on the left side to see the coolness.

    This is still pretty good but how good it will be when you advance app with 2 features:

    1. Attractive initial state. It could be random combination of Chart, Data, Style and Effect i think. And it is pretty easy to implement.

    2. Deep linking. Maybe it’s harder to do but it worth It because of potential attractiveness of your app (unhappily user must click several times to see it). Just a few links to most atttactive application states will do the great job.

    Well, I’ve downloaded the source already and can do desired goodness at my own (and probably will do it soon); however, you can help Adobe with selling charting components just by implementing not very complex feature I mentioned.

    Thank you man!

  6. Martin Says:

    Ely,

    I’m getting the following Rails “Routing” error when I try to “View Source” on any of the chart sampler code:

    Routing Error

    Recognition failed for “/ChartSampler/srcview/index.html”

  7. Jeff Says:

    I cannot find the Chart Explorer in the qs.zip.

  8. Ekambaram Balaji Says:

    Ely
    I wanted to find out if line graphs can have secondary labels. E.g if I have dates in x-axis but each point I want to mark with a text TAG like INR, DKR etc

  9. james roy Says:

    Hi,

    Is it possible to have Custom Data Label assigned dynamically for Line Graphs?
    For example:
    2 point on graph says (XYZ)
    4 point says (ABC).

    Thanking you in advance.

    Regards,
    James

  10. Ofir Says:

    Ely,
    all of your work is, how to say, MESMERIZING!!
    i can only wish myself to be able to do such stuff alone.
    but not yet…
    about the “Custom Annotation” in the chart sampler, is there a way to translate the X/Y coordinates of the rectangle to points on the X/Y axes? so i can do zoom in.

    btw: is there part 2?

  11. Evan Gifford Says:

    Hmm … looks like the source is not available.

    Will you … pretty please with cherries on top ….. upload source? :^)

  12. Evan Gifford Says:

    I can confirm source is up, and I’m happy as a clam :^)

  13. Evan Gifford Says:

    Not sure if it matters much, but here:
    examples.customizing.LabeledRenderer.as

    There is a fills array which was meant to differentiate the bars from eachother, but it’s not actually used. ( var fill:Number = 0; )

    Can you think of a good way to maintain colors across built-in renderers and custom item renderers without passing this in the dataProvider?

  14. Ryan Guill Says:

    I wasn’t able to find any contact information on the site so I thought I would ask here, I hope you don’t mind:

    Do you have any examples of programatically adding a series to a chart?

    My eventual objective is to be able to drag items from a list into a chart and have the data plotted. I am stuck though on programatically adding the series to the chart. Any ideas?

  15. Steve Peters Says:

    Ely,

    I working on some flex plots of energy usage on my university campus, and I’m excited to get it working.

    I have a question about title orientation for vertical axes. You didn’t have a vertical axis title in any of your samples, but when I apply it, it looks backwards. I’ve found how to change axis label rotation, but I couldn’t figure out how to change the title rotations. Any ideas for rotating it 180 degrees?

    Thanks,
    Steve

  16. April Says:

    Ely, I really liked your charting examples, they were very easy to understand and I’m very new to flex. What I wanted to do was create a type of “Gantt” chart and I was using your floating bars example. My problem is that when I changed the “revenue” item from a whole number to a date, everything stopped working. Do you know if it’s possible to use dates with the floating bar example and if perhaps I’m just doing something really wrong?

    I’ve seen a lot of discussion going around for the need for a “Gantt” chart… I was wondering if you had thought about that or had anything in the works.

    Thanks for all your time putting things like this together. It really helps us newbies.

    April

  17. Rob Grzywinski Says:

    I have been having much difficulty in getting anti-aliased fonts to work within the context of a chart. Your BarWithLabel.mxml for example does not use anti-aliased fonts for the bar labels. What would need to be changed to have the bar lables use anti-alias fonts? I’ll take any hints, tips or suggestions you may have!

    Thanks,
    Rob

  18. hopeful Says:

    I’m having difficulty getting the chart sampler going from the
    downloaded source

    “Could not resolve to a component implementation.
    ChartSampler/examples/styling MXMLStyles.mxml line 14″

    what it seems to be complaining about is that a missing component
    called “Selector” is missing in the name space
    xmlns:s=”examples.styling.*”

    and sure enough there doesn’t seem to be a component definition called
    “Selector” within examples.styling.

    (s:StyleValue seems to be missing too so I suspect a bunch of class
    files are missing, although how the live sample is working has got me
    spooked)

    or am I doing something wrong?

    thanx
    b

  19. Rob Grzywinski Says:

    In response to my own question about anti-aliasing I have found that the property that makes or breaks anti-aliasing is the “styleName”. If you have a “styleName” set on your component (or children of some component or IDataRenderer or whatever) and you have a corresponding “. { … }” style entry (typically with an embeded font) then you can get anti-aliased fonts.

    I hope this helps. And if not feel free to contact me.

  20. Rob Grzywinski Says:

    D’oh! My text got chewed:

    … corresponding “.[styleName] { … }” style entry …

  21. Anupama Says:

    Hi Ely,

    Thanks for the great samples. But I noticed one thing in the samples as well as my own app that I am developing. When you have a custom ChartItem with custom properies (say your labled bar chart), SeriesInterpolate will not work. The chartItem that is set as “data” in the item renderer refers to the base class, instead of the derived class. Wondering if this is a bug or am I missing something ?

  22. Dan G. Switzer, II Says:

    I’m having the same issue as hopeful. I’m getting the error

    “Could not resolve s:Selector to a component implementation. MXMLStyles.mxml ChartingSamples/examples/styling”

    How can this issue be resolved?

  23. Ozan Ersoy Says:

    Hi,

    I get the same error as Rob,

    Description: Could not resolve to a component implementation.
    On Resource: MXMLStyles.mxml
    In folder: app/examples/styling
    Location: line 14

    I’ve just started learning Adobe Flex 2.0 and couldnot overcome this problem. Might you help with it please?

  24. Ozan Ersoy Says:

    First of all, mine problem was same as Hopeful’s problem, not Rob’s, sorry for inconvenience.

    Second, as Hopeful states probably a file is missing including one or more classes.

    To overcome the problem I used a harsh method: commented the part of code causing the problem, that is:

    –>

    in MXMLStyles.mxml.

    A second problem was about fonts, arial.ttf was missing. I copied it from Windows/fonts directory to project folder.

    After those, somehow it worked. I dont know what is missing in the application now as a result of the commented code though.

    If what you seek is a working charting example as I do, these might help.

  25. Dana Says:

    I’m with April. Any possibility of seeing some kind of Gantt chart implementation using dates on the X axis and projects on the Y axis?

    By the way, you are one sick dude! Thanks so much for sharing your code and what you have learned. This stuff is incredible.

  26. Paul Says:

    I’m getting the same error as ‘hopeful’ above, no ‘Selector’.

    Plus, firefox 2.0.0.5 doesn’t seem to like this page anymore (ie will launch)

  27. Mush15 Says:

    First thank you for providing so much illumination to what has been a very dark journey.

    I hate to add to the requests but I was wondering if it is possible to show datatips in a chart in response to an action in a component other than the chart.

    Any help is greatly appreciatted

Leave a Reply