CDE前台组件CCC的介绍
在使用CDE的时候大家对CDE的各个图形的设置是不是有点范难了,主要是不知道怎么下手今天就给大家分享一些这方面的参考资料.
首先需要了解的是CDE(Community Dashboard Editor)的前台用的是CCC(Community Charting Components)(一个JS库)而CCC又是继承自protovis的,但是CCC又对protovis做了封闭,所以并不是所有的protovis属性都可以在CCC配置,不过不用担心,CCC为我们提供了Extension Points 来做扩展.
以下是CCC官网对CCC的简介:
-----------------------------------------------------------------------------------------------------------------------------------------
CCC stands for Community Chart Components, the CTools charting library, which is build on top of Protovis, a very powerful free and open-source visualization toolkit.
The aim of CCC is to provide developers the path to include into their dashboards the basic chart types, without losing the main principle: Extensibility.
You should prefer CCC over other kind of charts because of the CCC chart properties inherited from Protovis:
- The CCC charts look great, are flexible, allow interaction and much more.
- The most attractive feature of CCC charts is the huge customization capability.
Not only that: you know that Protovis has those features; it just happens that CCC has not implemented them yet. It is not the end of the world. Certainly you can live without those particular features, but if you really want to configure those attributes in your chart, you're lucky because you can define an extension point.
An Extension Point is a CCC concept that allows you to implement all the Protovis properties not implemented directly in CCC. When defining an extension point you have to provide a name
and a value
.
<CCC identification> + _ + <Protovis_property_name>
For example for defining the angle for the y-label you define an extension point named yAxisLabel_textAngle
. A CCC component can have as many extension points as you need.
You can find a list of the supported protovis properties right here, on each chart type's page, on the CCC reference documentation page, or, even, in the Protovis documentation page.
http://mbostock.github.io/protovis/jsdoc/
CCC 的文档地址:
http://www.webdetails.pt/ctools/charts/jsdoc/
CCC 提供的例子:
http://www.webdetails.pt/ctools/ccc/