Scatter Plots

I've added scatter plots. These charts are powered by code that does both the placing the (variably sized) dots on the scatter plot, and placing the line markers dots on the plot lines.


Nearly done.  I still have to make cumulative bar charts, and enable dot-markers on the cumulative line chart from the previous post. I'll probably add some white-space between the y-title and the y-numbers.  

Chart rendering is now (pretty much) in the bag.

I've got charts pretty much licked. The following image shows line charts, a bar chart, and a cumulative line chart.  I've still got to make scatter plot charts and cumulative bar charts.  Then I need to pick some better default colors — I dropped the sophisticated color AI I mentioned earlier because it had a tendency to pick a lovely shade of puke green and some complementary colors.    Now I just use preset colors that can be overridden.

The colors I'm using (blue, red, green) are okay, but I'll try to create a default set that is both lovely, sufficiently contrasted, and as usable by the visual impaired as can be without giving up too much prettyness. 

Also I dropped the object orientation.  As my design took shape I found the OO approach wasn't pulling its weight and was making me design an API that was good for subclasses rather than an API that was good for making charts.

Charts still coming (here is a sample). Labels print horizontally, text-scale is determined automatically.

This is how the pie chart looks now.  It was difficult to write functions to add text to the charts. I've decided to use arial, so my font size calculations are based on that.  More importantly, I've now got the general flow figured out. Meaning that I've explored this problem enough that I have a handle on what parts can be reused when I make bar and line charts, which are still coming.


More pie charts

I’m still playing with charts.  Its a matter of finding the simplist path from a collection of data to a nice picture.  Along the way, I need to figure out the scale, place rotate and resize the labels, draw axis, and pick colors, all while drawing from bottom to top.

This image shows the work in progress.  The colored rectangles outside the circle will hold labels. The white rectangles inside the circle will show percentage of total (or dollar amount, or # of units).

Pie Chart

One Day, FormLis will build lovely charts. Pie charts, bar charts, line charts. Here is a sample.

FormLis makes data collection and reporting easy. One day (months away?)  I’ll add charting.  I’ve already got most of the chart description language planned out; so I took the time to make some lisp-assisted pie chart shapes:




This took work.  First I researched a bunch of pi charts to determine what I thought looked best: simple, round, and solid color. Then I needed super accurate math to compute the wedges, if they didn’t line up perfectly, little slivers of white would ruin the asthetic.   I ended up using fixed point math (and defining PI as exactly 4096), and I had to write my own trig functions.


That was the easy part.  The hard part is color.  My plan is to let users specify colors (blue, red, or via RGB triplets) if they want.  Regardless of what they do FormLis will have to select complimentary colors.


However, its not obvious how you code that.  My plan would bore you, but the trick is to operate in a color space where choosing complementary colors is easy.  In my case I select colors from the LAB color space and then map them to RGB.  In LAB, I can control brightness and saturation while picking colors, while in RGB all I could do would be to hold red and blue intensity while selecting green intensity.  The conversion is very math heavy though, I cargo-culted it from Bruce Lindbloom, who has the best resource on the mathematics I’ve ever seen.

How Some Businesses are putting their Forms and Reports Online with No Risk

This PDF summarizes how FormLis Forms & Reports can save your company money.

[PDF Version]


Get every new post delivered to your Inbox.

Join 33 other followers