chart shows the horizontal interrupted

sponsored links
1, the horizontal axis on the creation date details of the more common type A form of the horizontal axis is time, vertical axis is the value described. If the density in the data and time is not the case, there is no need to remove the database time string into a date type. But faced with a large span of time, and its value has distribution-intensive, horizontal axis shows the date the subject will be small enough to not see them. Then the most reasonable solution might be to use DateTimeAxis the dataUnits (time display unit is displayed on the horizontal axis the minimum time interval). This requires first of all LineChart the xField be converted into date type. Date object is to support the style of the string from the date of construction, but a limited number of:
Day Month Date Hours: Minutes: Seconds GMT Year (for instance, "Tue Feb 1 00:00:00 GMT-0800 2005", which matches toString ())
Day Month Date Year Hours: Minutes: Seconds AM / PM (for instance, "Tue Feb 1 2005 12:00:00 AM", which matches toLocaleString ())
Day Month Date Year (for instance, "Tue Feb 1 2005", which matches toDateString ())
Month / Day / Year (for instance, "02/01/2005")
Month / Year (for instance, "02/2005")
Depression is SqlServer 2000 supports the date output format does not have a match, better DateTimeAxis support the conversion of string to date:
xml code

mx: horizontalAxis>

as code
private function parseToDate (s: String): Date (
/ / S = "2007-10-15 20:15"
var temp: Array = s.split ("");
var datepart: String = temp [0];
var datearray: Array = datepart.split ("-");
var timepart: String = temp [1];
var timearray: Array = timepart.split (":");
var newDate: Date = new Date (datearray [0], datearray [1], datearray [2], timearray [0], timearray [1]);
return newDate;
)

This time span according to the size, you can adjust the horizontal axis the minimum time interval size. If the data reflect the year, you can set dataUnits Months, if the data reflect a month or several tens day oersted can be dataUnits set to days, and so on.
  • del.icio.us
  • StumbleUpon
  • Digg
  • TwitThis
  • Mixx
  • Technorati
  • Facebook
  • NewsVine
  • Reddit
  • Google
  • LinkedIn
  • YahooMyWeb

Related Posts of chart shows the horizontal interrupted

  • Javascript object inheritance

    Javascript object inheritance

  • javascript regular expressions Basic Usage

    <script type="text/javascript"> window.onload = function(){ //RegExpInitialization ,gRefers to the global ,iIs case-insensitive var reg = new RegExp("cat","gi"); var exp = /cat/gi; //RegExpThe test ()Method ,The return value is true or false alert(r

  • Javascript Object Model

    Javascript Object Model

  • Hibernate query: HQL and Criteria

    HQL query methods generally used in more general way through the query query. Examples are as follows: The Criteria is a more than HQL query object-oriented approach: Created as follows: Criteria crit = session.createCriteria (Object.class); crit.add ...

  • Hibernate II Study Notes

    11. Many-to-many Of many that can be converted to two one-to-many <set name="students" table="teacher_student"> <key column="techer_id"/> <many-to-many column="student_id"/> </set> many-to-many data only from one end of the mainten

  • JS in the Date type conversion

    http://blog.csdn.net/yzy0612/archive/2007/08/07/1730732.aspx

  • Detailed JS regular expressions

    Opening, or have to talk about ^ and $ that they are separately used to match the beginning and end of the string, the following examples to illustrate separately "^ The": there must be at the beginning of "The" string; "of despai

  • Hibernate Inteceptor

    The end of the project stage, the client suddenly put forward a very troublesome but normal demand, the system records all changes must be carried out. Formats such as: 2004.1.1 12:30 Ikuya wind orders Sales Order Date 2004.1.2-> 2004.1.3 The firs ...

  • can not be represented as java.sql.Timestamp

    Development of procedures for the use of hibernate when, some time there is no need to fill in the fields, but after the hibernate query time reported "Java.sql.SQLException: Value'0000-00-00 'can not be represented as java.sql.Timestamp ...

  • First Hibernate Example

    Curd a simple example. Source does not contain the dependent libraries, or playing too much of the package. PO object Note: One must have the default constructor 2 non-final modified. Otherwise useless lazy loading. UserDAOImpl category code, and other co

blog comments powered by Disqus
Recent
Recent Entries
Tag Cloud
Random Entries