/+junk/pygooglechart-py3k

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/%2Bjunk/pygooglechart-py3k

« back to all changes in this revision

Viewing changes to examples/helper.py

  • Committer: gak
  • Date: 2008-05-03 07:30:58 UTC
  • Revision ID: git-v1:9342edb8666dde7e843e3eb438f1f6a717aa32fc
- Really added initial unit tests
- Converted setup.py to unix file format
- warnings made when data is being clipped and when data scaling is incorrect
- max_value is now a variable
- pie and google-o-meter chart data is now on the x-axis
- More grammar work

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import random
 
2
 
 
3
def random_data(points=50, maximum=100):
 
4
    return [random.random() * maximum for a in xrange(points)]
 
5
 
 
6
def random_colour(min=20, max=200):
 
7
    func = lambda: int(random.random() * (max-min) + min)
 
8
    r, g, b = func(), func(), func()
 
9
    return '%02X%02X%02X' % (r, g, b)
 
10