Skip to content

Instantly share code, notes, and snippets.

@philogb
Created June 22, 2011 00:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save philogb/1039259 to your computer and use it in GitHub Desktop.
Save philogb/1039259 to your computer and use it in GitHub Desktop.
/* SASS like proposal: I'm not sure if this is correct since I didn't have the chance to look at the
new format. I hope this helps. */
.chart#mychart
axis
fill: '#000'
'stroke-width': 1
axisLabelTop
fill: '#000'
font: '11px Arial'
axisLabelLeft
fill: '#000'
font: '11px Arial'
axisLabelRight
fill: '#000'
font: '11px Arial'
axisLabelBottom
fill: '#000'
font: '11px Arial'
axisTitleTop
fill: '#000'
font: '11px Arial'
axisTitleLeft
fill: '#000'
font: '11px Arial'
axisTitleRight
fill: '#000'
font: '11px Arial'
axisTitleBottom
fill: '#000'
font: '11px Arial'
series
'stroke-width': 1
seriesLabel
font: '12px Arial'
fill: '#333'
marker
stroke: '#555'
fill: '#000'
radius: 3
size: 3
/* I'm not sure if the syntax supports something like arrays...
if it does, then something very similar to the json could be used, I'm not sure about this */
seriesThemes: [{
fill: '#C6DBEF'
}, {
fill: '#9ECAE1'
}, {
fill: '#6BAED6'
}, {
fill: '#4292C6'
}, {
fill: '#2171B5'
}, {
fill: '#084594'
}],
/* If the syntax does not allow arrays, then another way of specifying this would be with
seriesThemes0, seriesThemes1, seriesThemes2, etc. */
seriesThemes0
fill: '#C6DBEF'
seriesThemes1
fill: '#C6DBEF'
seriesThemes2
fill: '#C6DBEF'
seriesThemes3
fill: '#C6DBEF'
/*...I guess there might be other options too. */
/* same thoughts for the markers */
markerThemes0
fill: '#084594'
type: 'circle'
markerThemes1
fill: '#084594'
type: 'circle'
markerThemes2
fill: '#084594'
type: 'circle'
markerThemes3
fill: '#084594'
type: 'circle'
/* However most of the time the user will create something simpler by using one of these two properties: */
.chart#mychart
colors: ['#ccc', '#ddd', '#fff']
/* or... */
.chart#mychart
colors0: '#ccc'
colors1: '#ddd'
colors2: '#fff'
/* or... */
.chart#mychart
baseColor: '#ccc'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment