我正在使用Dimensional Charting javascript库dc.js创建一个图表,它基于d3和crossfilter。我是dc.js library.i的新手。我正在尝试使用django框架为python.i显示图形,使用dataforamat csv。 csv采用以下格式。我很困惑显示数据以饼图,行图,条形图,气泡图格式显示。
Name,Date,Word,Word_count
The Telegram,2014-04-02,Panag,1
The Telegram,2014-04-02,rule:,1
The Telegram,2014-04-02,Story,1
The Telegram,2014-04-02,U.P.,1
The Telegram,2014-04-02,leaders,1
The Telegram,2014-04-02,Mumbai,1
The Telegram,2014-04-02,Union,1
The Telegram,2014-04-02,Dimple,1
The Telegram,2014-04-02,Drivers,1
The Telegram,2014-04-02,Tennis,1
The Telegram,2014-04-02,son,1
The Telegram,2014-04-02,Style,1
The Telegram,2014-04-02,Anantnag,1
The Telegram,2014-04-02,Golf,1
The Telegram,2014-04-02,Chess,1
The Telegram,2014-04-02,cook,1
The Telegram,2014-04-02,u.p.,1
The Telegram,2014-04-02,best-seller,1
The Telegram,2014-04-02,Arts,1
The Telegram,2014-04-02,Interview,1
The Telegram,2014-04-02,Jaha,1
The Telegram,2014-04-02,Mehboob,1
The Telegram,2014-04-02,Other,1
The Telegram,2014-04-02,Hollywood,1
The Telegram,2014-04-02,Week,1
The Telegram,2014-04-02,Modis,1
The Telegram,2014-04-02,Life,1
The Telegram,2014-04-02,TV,1
The Telegram,2014-04-02,Delhi,2
答案 0 :(得分:0)
我不确定问题是什么,但你不需要在dc.js上使用django,除了生成你提到的csv。其余的纯粹是在浏览器中。
如果要对字符串日期进行过滤,则需要预先处理数据以将字符串日期转换为javascript日期(例如,将其用作线图上的X轴)
对于dc提供的各种图表,您可以查看该文档:https://github.com/dc-js/dc.js/blob/master/web/docs/api-latest.md