Minimal Charts!

I have an idea in mind for an app. It needs charts. Therefore, we now have minimal charts.

First is the Bar Chart and Line Chart:

[kml_flashembed publishmethod=”static” fversion=”10.0.0″ movie=”http://www.bit-101.com/blog/wp-content/uploads/2010/03/BarAndLineCharts.swf” width=”250″ height=”250″ targetclass=”flashmovie”]

Get Adobe Flash player

[/kml_flashembed]

And then the Pie Chart:
[kml_flashembed publishmethod=”static” fversion=”10.0.0″ movie=”http://www.bit-101.com/blog/wp-content/uploads/2010/03/PieChart.swf” width=”270″ height=”250″ targetclass=”flashmovie”]

Get Adobe Flash player

[/kml_flashembed]

Coming soon, the Rubber Chicken Graph. (Name that comedian.)

Each chart takes an array passed into its data property. For Line and Bar charts, this is an array of Numbers. These two charts are set to autoScale = true by default. But you can set that to false and provide minimum and maximum values. Set showScaleLabels to true to show the max and min values in labels off to the left as in the examples. The labelPrecision property can be used to determine how these are rounded off if necessary. The Bar Chart’s bar colors can be specified with barColor, and the Line Chart’s lines can be customized with lineColor and lineWidth.

In the Pie Chart, you can also pass an array Numbers to data, or you can pass an array of Objects, where each object has a value property, and optionally a label and color property. If no label is provided, the value is used as a label, rounded off again using labelPrecision. If you don’t want any label, pass in an empty string. If no color is provided, each pie slice will use predetermined color values. You can also pass in an array of color values to the colors property to use those instead. If you run out of color values, random colors will be assigned. Sorting of your data needs to be done manually, if you want the slices to appear in order of size. By default, the first slice starts at an angle of zero degrees. You can change this with beginningAngle, which is in degrees. There is no limit to the number of slices you can have, but too many will make the labels overlap. And more than that, you won’t even be able to see the smaller slices. There is no consolidation or hiding of tiny slices. That’s up to you to handle by tweaking your data first.

http://www.minimalcomps.com

This entry was posted in ActionScript, Components, Flash. Bookmark the permalink.

7 Responses to Minimal Charts!

  1. Rodrigo says:

    MinimalComps Esta creciendo muy rapido. Esperemos que siga así

  2. Tristan says:

    I really like MinimalComps. I want to use them more, but the lack of a combobox equivalent from the Flash components is a real limitation.

    Any chance we might see one in the future?

    • kp says:

      I am wrapping up a List component right now. In fact, it’s checked in to SVN. Needs a bit more testing and I’ll release it. From there, a combo box / dropdown list type of component isn’t too hard to create since it’s largely just a button that shows and hides a list.

  3. Michael says:

    Great work mate, I feel like these are the components i’ve been meaning to build or half building for years, and you’ve done a really great job.

  4. Tristan says:

    Cool! I look forward to it 😀

  5. rkerhin says:

    Steve Martin uses a rubber chicken graph on the first side of the LP “Wild and Crazy Guy”.

  6. Vic says:

    What’s a good way for me to create a multi line chart?

Leave a Reply