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.
Credits: Webdetails Team, Lead - Pedro Alves; Cees van Kemenade (vinzi)
-------------------------------------------------------------------------------------------------------------------------------------
上面的大概意思是说CCC是CTools的Chart库是基于protovis的,CCC的目的是在不失去其扩展性的原则上为开发者提供仪表盘基本图形(Chart).
以下是CCC官网对CCC的Extension Points进行的说明:
--------------------------------------------------------------------------------------------------------------------------------------
When you configure CCC components, you can see that the most commonly used properties such as width and height, title, legends or colors are already implemented. However you may notice that the charts lack some other properties as, for example, the font for the x-axis, or the rotation angle for the y-labels.

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.

NAME FORMAT
<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.

--------------------------------------------------------------------------------------------------------------------------------------
大概意思是,你在使用CCC的时候只可以设置一些基本的属性,如果你想设置Chart的高级属性这些属性在protovis中是有的但是在CCC中并没有实现,这时就要用到Extension Point了,在定义Extension Point的时候需要指定name和value并在下面给出了name的格式.
最后给大家分享一些相关的文档和例子:
webdetails 项目地址:
 

我的Email:[email protected]

我的博客:http://alenzhai.iteye.com/

另外也欢迎大家加入 下面的群来聊一聊 开源BI那些事!

开源BI交流


猜你喜欢

转载自alenzhai.iteye.com/blog/2172646
cde
ccc