From Documentation

Jump to: navigation, search



Deprecated, please use ZK Charts instead


Timeplot is a DHTML-based AJAXy widget for plotting time series and overlay time-based events over them.

You can populate Timeplot with data by pointing it to an space or comma separated file. Timeplot also supports Timeline's XML format, meaning that you can reuse the same data file of your Timeline and overlay them over a time series plot.


ZKCompRef Timeplot.png

	<div width="1200px">
		New Legal Permanent Residents in the U.S. (per year) vs. U.S.
			import org.zkforge.timeplot.geometry.*; 
			import org.zkforge.timeplot.operator.*;
			import org.zkoss.zul.*;
			PlotDataSource pds=new PlotDataSource();
			pds.setSeparator(" ");
			ValueGeometry vg=new DefaultValueGeometry();
			TimeGeometry tg=new DefaultTimeGeometry();
		<timeplot width="1000px" height="300px">
			<plotinfo id="plot 1" plotDataSource="&#36;{pds}"
				dotColor="#000000" showValues="true" lineColor="#008bb6"
				valueGeometry="&#36;{vg}" timeGeometry="&#36;{tg}"
				eventSourceUri="misc/us_history.xml" />


1820 8385
1821 9127
1822 6911
1823 6354
1824 7912
1825 10199
1826 10837
1827 18875
1828 27382
1829 22520
1830 23322


<?xml version="1.0" encoding="UTF-8"?>
    <event start="Jan 01 1849 00:00:00 GMT" title="California Gold Rush" link=""></event>
    <event start="Apr 12 1861 00:00:00 GMT" end="Apr 09 1865 00:00:00 GMT" title="American Civil War" link=""></event>
    <event start="Aug 03 1882 00:00:00 GMT" title="Immigration Act of 1882" link="">The U.S. Congress passes a new Immigration Act that stated that a 50 cents tax would be levied on all aliens landing at United States ports. The money collected was to be used to defray the expenses of regulating immigration and for the care of immigrants after landing. The legislation also gave powers to the authorities to deny entry to "convicts (except those convicted of political offences), lunatics, idiots and persons likely to become public charges".</event>
    <event start="Apr 25 1898 00:00:00 GMT" title="Spanish-American War" link=""></event>
    <event start="Jul 28 1914 00:00:00 GMT" end="Nov 11 1918 00:00:00 GMT" title="World War I" link=""></event>
    <event start="Jan 01 1924 00:00:00 GMT" title="Immigration Act of 1924" link="">The Immigration Act of 1924, which included the National Origins Act, Asian Exclusion Act or the Johnson-Reed Act, was a United States federal law that limited the number of immigrants who could be admitted from any country to 2% of the number of people from that country who were already living in the United States in 1890, according to the Census of 1890. It excluded immigration to the US of Asians. It superseded the 1921 Emergency Quota Act. The law was aimed at further restricting the Southern and Eastern Europeans who had begun to enter the country in large numbers beginning in the 1890s, as well as East Asians and Asian Indians, who were prohibited from immigrating entirely. It set no limits on immigration from Latin America.</event>
    <event start="Oct 29 1929 00:00:00 GMT" title="Black Tuesday" link=""></event>
    <event start="Jan 01 1933 00:00:00 GMT" end="Jan 01 1938 00:00:00 GMT" title="New Deal" link=""></event>
    <event start="Sep 01 1939 00:00:00 GMT" end="Sep 02 1945 00:00:00 GMT" title="World War II" link=""></event>
    <event start="Jun 25 1950 00:00:00 GMT" end="Jul 27 1953 00:00:00 GMT" title="Korean War" link=""></event>
    <event start="Aug 02 1964 00:00:00 GMT" end="Apr 30 1975 00:00:00 GMT" title="Vietnam War" link=""></event>
    <event start="Jul 21 1969 00:00:00 GMT" title="Man on the Moon">Neil Armstrong becomes the first person to walk on the Moon as the commander of the American mission Apollo 11.</event>
    <event start="Jan 01 1980 00:00:00 GMT" title="Refugee Act">The Refugee Act is a 1980 United States federal law that reformed United States immigration law and admitted refugees on systematic basis for humanitarian reasons. A 1985 ceiling of 70,000 refugees, with 270,000 immigrants total and 20,000 from any one country, was established.</event>
    <event start="Nov 06 1986 00:00:00 GMT" title="Immigration Reform and Control Act of 1986" link="">The Act made it illegal to knowingly hire or recruit illegal immigrants, required employers to attest to their employees' immigration status, and granted amnesty to illegal immigrants who entered the United States before January 1, 1982 and had resided there continuously.</event>
    <event start="Nov 29 1990 00:00:00 GMT" title="Immigration Act of 1990" link=""></event>
    <event start="Sep 30 1996 00:00:00 GMT" title="Illegal Immigration Reform and Immigrant Responsibility Act of 1996" link=""></event>
    <event start="Sep 11 2001 00:00:00 GMT" title="Attack at the World Trade Center" link=""></event>

Supported Events

Event Type
None None

Supported Children

* Plotinfo

Use Cases

Version Description Example Location
3.6 Smalltalk: Using Timeplot component-Part I Using Timeplot component-Part I
3.6 Smalltalk: Using Timeplot component-Part II Using Timeplot component-Part II

Version History

Last Update : 2014/7/15

Version Date Content
  July, 2014 Deprecate this component, please use ZK Charts instead

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.