Sencha Touch Charts style

拟墨画扇 提交于 2020-01-17 07:46:25

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!