chart shows the horizontal interrupted

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.

分类:Flash 时间:2010-03-30 人气:212
blog comments powered by Disqus


  • String List, Array conversion and the use of Predicate Delegate 2010-04-24

    string[] a = new string[] { "A", "B", "C", "D", "E" }; //Array Go List //new List<string>(string[]) List<string> b = new List<string>(a); //List Go Array //List<string>.ToArray() Me

  • [Oracle] to_date () and to_char () Date and string conversion 2011-01-13

    [Oracle] to_date () and to_char () Date and string conversion to_date ("The string to convert," "convert format"), two parameters must match the format, otherwise it will error. The second parameter is the format in accordance with the

  • Data.String.Calendar type conversion between 2010-05-27

    1.Calendar String conversion / / Get the current time, the specific circumstances, such as year, month, day, week, date, minutes, seconds, etc. Calendar calendat = Calendar.getInstance (); SimpleDateFormat sdf = new SimpleDateFormat ("yyyy-MM-dd"

  • Convert Oracle date and string functions 2010-09-02

    Date and string conversion functions use to_date, to_char 1, find the day of the week select to_char (to_date ('2002-08-26 ',' yyyy-mm-dd '),' day ') from dual; 2, the system date sysdate 3, the number of days between two dates select floor (sysdate

  • and String 2010-03-18

    package date_transfor; import java.text.SimpleDateFormat; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; / ** * * @ Author henry.xiao * * / public class Date_transfor ( private static Log log = LogFactory.getLog

  • Java: set with an array conversion 2010-05-04

    List, Set into an array of methods. toArray function has two forms, one without parameters, a kind of parameter, note form with parameters to specify the size of the array. Code: 1 2 3 4 5 6 7 8 9 public void convertCollectionToArray() { List list =

  • C + + base - string and the conversion of mutual int 2010-10-27

    #include < iostream > #include < string > #include < sstream > // To use stringstream stream should include this header file using namespace std; int main() { stringstream stream; // Declare a variable stringstream int n; string str; //s

  • JavaScript字符串String和Array操作的有趣方法 2015-03-24

    字符串和数组在程序编写过程中是十分常用的类型,因此程序语言都会将String和Array作为基本类型,并提供许多字符串和数组的方法来简化对字符串的操作 字符串和数组在程序编写过程中是十分常用的类型,因此程序语言都会将String和Array作为基本类型,并提供许多字符串和数组的方法来简化对字符串的操作.JavaScript里面也提供了String类型和Array类型,并且有很多基本的String方法和Array方法来方便地对字符串进行合并.查找.替换.截取等处理. JavaScript作为一个脚

  • java中Date与String的相互转化 2015-03-31

    1:大体思路 [html] view plaincopy 这种转换要用到java.text.SimpleDateFormat类 字符串转换成日期类型: 方法1: 也是最简单的方法 Date date=new Date("2008-04-14"); 方法2: SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");//小写的mm表示的是分钟 String dstr="2008-4-24"; j

  • Date and string conversion java 2010-09-14

    1 SimpleDateFormat take a leading role, and how to format all rows import java.util.Date; import java.text.SimpleDateFormat; public class Demo ( public static void main (String [] args) ( Date now = new Date (); SimpleDateFormat f = newSimpleDateForm

iOS 开发

Android 开发

Python 开发



PHP 开发

Ruby 开发






Javascript 开发

.NET 开发



Copyright (C), All Rights Reserved. 版权所有 闽ICP备15018612号

processed in 0.223 (s). 12 q(s)