简体   繁体   English

如何处理时间轴/图表的Flex自定义组件?

[英]How to approach flex custom component for timeline/chart?

For my application I need a component (or combination of components) that shows a number of different types of events along a timeline, displays them in different ways as specified and allows you to click/hover along the timeline to add/modify/get details on events. 对于我的应用程序,我需要一个组件(或组件的组合)来显示时间轴上的多种不同类型的事件,并按照指定的方式显示事件,并允许您在时间轴上单击/悬停以添加/修改/获取详细信息在事件上。

Basically I want a timeline across the top, always showing a 24hour period, but starting at variable points. 基本上,我希望整个顶部都显示一个时间轴,始终显示24小时周期,但要从可变点开始。 I need to have different rows of variable height to display different types of data in different ways. 我需要具有可变高度的不同行,才能以不同方式显示不同类型的数据。 for instance: 例如:

  • row 1 will display the 'value' attribute as a circle whose diameter reflects value amount and change color based on a 'typecode' attribute. 第1行将显示“值”属性为圆形,其直径反映值的大小并根据“类型代码”属性更改颜色。
  • row 2 will display a line graph and plot chart based on different numbers (like one chart but with the datapoints as larger dots), and will also chart out trend of following or previous data if it exists. 第2行将显示基于不同数字的折线图和曲线图(类似于一个图表,但数据点为较大的点),并且还将绘制后续或先前数据的趋势(如果存在)。
  • behind row 2 will display the same thing but for 5 previous days progressively more transparent 第2行后面的内容将显示相同的内容,但前5天逐渐透明
  • row 3 will display the number values from row 2 第3行将显示第2行的数字值
  • row 4 will display another type of data, this one with duration, as thick lines from start time to end time. 第4行将显示另一种类型的数据,其中包含持续时间,以从开始时间到结束时间的粗线显示。 you will be able to click with in this row once to set startpoint of new entry and once to set endpoint to create new entry. 您将可以单击该行中的with来设置新条目的起点,并一次设置端点来创建新条目。 onclick.. onclick ..
  • row 4 will display color coded squares for a number of different datatypes and hovering will reveal details. 第4行将显示许多不同数据类型的颜色编码的正方形,并且悬停将显示详细信息。

all rows need to share the same timespan, and I'd like to be able to have click/hover events that target the data object/values of the data being displayed. 所有行都需要共享相同的时间跨度,并且我希望能够具有针对数据对象/所显示数据的值的单击/悬停事件。

I also would like gridlines going across the background of all the rows. 我也希望网格线穿过所有行的背景。

At some point I'd like to be able to compress certain areas of the timeline, but I'm not going to worry about that yet. 在某个时候,我希望能够压缩时间轴的某些区域,但我现在不会为此担心。

I'm not sure if I should attempt to extend the flex advanced datagrid, or use one of the several vaguely similar component types I've found online ( http://www.gantt4flex.com/ , http://flexlib.googlecode.com/svn/trunk/docs/index.html?flexlib/schedu ling/), or how best to approach, but I need to get this on its feet fairly quickly. 我不知道我是否应该尝试延长柔性先进的DataGrid中,或使用我在网上找到几个依稀相似的组件类型之一( http://www.gantt4flex.com/HTTP://flexlib.googlecode .com / svn / trunk / docs / index.html?flexlib / schedu ling /)或最佳方法,但我需要尽快将其付诸实践

I have a data model and can come up with whatever data I need no problem (working from sqlite). 我有一个数据模型,可以提出我没有问题的任何数据(从sqlite工作)。 But I haven't built a component from scratch before and am wondering how to approach something like this.. how to break it down.. and how much I can use already existing components and modify them. 但是我以前没有从头开始构建一个组件,并且想知道如何处理这样的事情..如何分解它..以及我可以使用多少现有组件并对其进行修改。

组件草图 (date selector would be separate) (日期选择器将是单独的)

Take a look at amcharts . 看一看amcharts This should get you started. 这应该使您入门。 Also email them or ask questions on the forums as they answer very quickly. 还可以给他们发送电子邮件或在论坛上提问,因为他们回答得非常快。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM