问题
I'm playing with Sencha Touch Charts. I've got them working, with interactions, animation everything is good. I even styled a bunch of them.
But when I got around styling a series of type area.. it just wouldn't take.
new Ext.chart.Chart({
theme: 'MyTheme',
cls: 'myClass',
legend: { ... },
interactions: [{ ... }],
store: app.stores.MyStore,
axes: [...],
series: [{ type: 'area', axis: 'left', xField: 'Date', yField: 'someField' },
{ type: 'line', axis: 'right', xField: 'Date', yField: 'someField2' }
]
})
and the style
chart[cls=myClass] {
series {
&[type=area] {
fill: #FFA500;
}
&[type=line] {
stroke: #008000;
fill: #008000;
marker {
stroke: #008000;
fill: #008000;
}
}
}
}
so the line series is styled just fine, but the area is not :| Any idea?
回答1:
I've not actually tried this but it looks like you're almost there...
Based on the example found at http://docs.sencha.com/touch-charts/1-0/#!/guide/touch_charts_styling (at "axis" -> "label")
I'd try:
axis[position=bottom] {
label {
rotate: 0 0 45;
}
}
来源:https://stackoverflow.com/questions/8508047/sencha-touch-charts-style