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.
Charts still coming (here is a sample). Labels print horizontally, text-scale is determined automatically.Posted: 2011/03/27
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).
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.
I’m getting much faster at making these…
This PDF summarizes how FormLis Forms & Reports can save your company money.