Sparkline code up live.

Posted by dashCoder on May 22nd, 2008

I have posted the bare bones alpha code last night on the sparklinecfc.RIAForge.org site. The code is pretty sparse and no real documentation yet. But I felt it was better to just get the first version out and we could start tweaking from here.
The basic file setup for the code at this point is:

  • Core.cfc: basic shared functions (not sure if I am using this at this point)
  • Sparklline.cfc: This is the base Sparkline object that will hold all of the common items for the different types of microcharts.
  • BarChart.cfc: Collection of bar chart functions, the basic setting are "Full Chart" which essentially means consider the sum of all elements given to be 100% and then divide the chart from there. The other method is to dictate what 100% is by stating maxStackedBar = n. You also have the option to align the chart left or right.
    Bar Chart example
  • PieChart.cfc: The pie charts are rather plain at this point, you pass in the data and the colors and any border info you may want.
    Pie Chart Example
  • WinLossChart.cfc: basic params are win color, loss color, tie color and the data you put in.
    Win Loss Chart Example
  • BulletChart.cfc: Empty
  • ColumnChart.cfc: Empty
  • IconChart.cfc: Empty
  • LineChart.cfc: Empty
  • SparkTest.cfm: Sampel page showing the three chart types. I have added a couple functions from cflib.org. I really like the FadeList() function. It allows for nice chart shades
  • Test.cfm: another test, just the pie chart.

Please contact me if you have any questions. I know the code is a little hectic, but I figured it would be better than sitting on it any longer.

Comments are closed.

  • Change This Footer

    This Footer is easily and completely editable with widgets.

    Log into your admin panel, click on "Design" followed by "Widgets". From there you can arrange this sidebar by draging the options into their respective places on this sidebar.

    More information on using widgets can be found here.

    (This note will not be displayed once you have widget-ized this sidebar)