Help talk:EasyTimeline syntax

{{WikiProject banner shell|

{{Wikipedia Help Project|class=NA|importance=mid}}

}}

{{collapse top|1=Meta:Help:EasyTimeline syntax authors and history}}

  • 10:40, 8 March 2006 User:83.250.239.164 (→Bar related attributes - Syntax error in example)
  • 19:42, 30 December 2005 Meta:User:Kernigh (Talk (→AlignBars - {{subst:EasyTimeline_Examples_AlignBars}} because the template only appears here, and does not exist at other projects)
  • 23:49, 13 December 2005 User:63.205.162.114 (→Bar related attributes - changed width=0.3 to width:0.3)
  • 13:55, 29 November 2005 Meta:User:Uncle G (Talk (Removed category. Fixed hyperlinks that break when this page is copied to other projects.)
  • 15:20, 26 November 2005 User:83.16.52.194 (→Font Support - timeline has some unicode support now)
  • 21:15, 29 May 2005 User:202.1.193.10 (→Available commands - oh well.. previous one did not work... fixing again)
  • 21:13, 29 May 2005 User:202.1.193.10 (→Available commands - fix subsection links)
  • 06:42, 25 March 2005 Meta:User:YebisYa (Talk m (→EasyTimeline code with a template parameter is not allowed - {{hc|langs=N.A.}})
  • 23:25, 27 February 2005 User:200.121.44.20 (→EasyTimeline code with a template parameter is not allowed)
  • 23:24, 27 February 2005 User:200.121.44.20 (→EasyTimeline code with a template parameter is not allowed)
  • 14:21, 30 September 2004 Meta:User:Patrick (Talk (The name "EasyTimeline" refers to the possibility to apply the feature with a time scale horizontally or vertically, possibly with another parameter in the other direction, but there are also various)
  • 11:44, 29 September 2004 Meta:User:Patrick (Talk (The EasyTimeline feature produces an embedded image from wikitext. The image can be be one-dimensional diagram (horizontally or vertically), or a two-dimension)
  • 21:36, 28 September 2004 Meta:User:Patrick (Talk (→Measurements - The first coordinate is horizontal from left to right, the second is vertically upward.)
  • 09:17, 28 September 2004 Meta:User:Patrick (Talk (→Embedded links - external link style is as usual with single brackets, but here with a pipe instead of a space. Blank spaces and underscores in the url should be written as %20.)

{{collapse bottom}}

Timeline or Graph?

Are the syntax for timelines? They seem to look more like graphs to me. Can someone show an example? NoNews! 01:33, 21 February 2010 (UTC)

: Strong agree BoldLuis (talk) 15:22, 20 May 2020 (UTC)

Help "Error Message" on Timeline

I have been preforming edits on the Southland Conference and the timeline continues to have an error message that says something to the effect of Invalid Image map created by easy timeline. It still displays the timeline though. I have copied entire timelines from other pages but nothing seems to work. Can someone help with this problem? ThomasHorn7 (talk) 15:12, 11 August 2010 (UTC)

I have also been attempting to edit the timeline but the error message continues to appear. Quidam65 (talk) 16:59, 11 August 2010 (UTC)

:Same issue at Colonial Athletic Association#Membership timeline 2 - any help would be appreciated. Thanks! GoingBatty (talk) 15:08, 4 January 2014 (UTC)

HSB vs. HSV

Hi.

I've been trying to create color mixtures using hsv syntax as the help page indicated but I am told that HSB is supported instead. Unfortunately, I had no luck with HSB either. Every combination that I test results in black.

Best regards,
Codename Lisa (talk) 11:59, 31 May 2014 (UTC)

: The back end does [http://ploticus.sourceforge.net/doc/color.html not support] HSB specifications for PNG images. I will remove this option from the help page. 84.127.115.190 (talk) 04:53, 19 November 2014 (UTC)

ISO 8601 date format

User:Erik Zachte

More and more sites and tools use ISO 8601 date format "yyyy-mm-dd".

Could this tool be updated to allow that format as input?

Currently only allowed is

  • mm/dd/yyyy - US format
  • dd/mm/yyyy - European, Latin American format

So, two all-numerical formats, but none of them allowed by WP style guide, which mandates ISO 8601 for all-numerical formats.

See also http://xkcd.com/1179/

Derianus (talk) 21:31, 28 September 2014 (UTC)

  • Hi Dedalus, I am not longer maintaining since 200?, but it should be a straightforward patch. You can either submit a patch yourself or file a bug for it. Cheers, Erik Zachte (talk) 17:35, 29 September 2014 (UTC)

:: Here it is:

{{collapse top|Patch}}

--- EasyTimeline.pl.orig 2014-11-07 19:49:49.000000000 +0100

+++ EasyTimeline.pl 2014-11-08 14:50:42.000000000 +0100

@@ -1076,11 +1076,13 @@

$datevalue = lc($datevalue);

if ( ($datevalue ne "dd/mm/yyyy")

&& ($datevalue ne "mm/dd/yyyy")

+ && ($datevalue ne "yyyy-mm-dd")

&& ($datevalue ne "yyyy")

&& ($datevalue ne "x.y"))

{

&Error(

- "Invalid DateFormat. Specify as 'dd/mm/yyyy', 'mm/dd/yyyy', 'yyyy' or 'x.y'\n"

+ "Invalid DateFormat. Specify as 'dd/mm/yyyy', 'mm/dd/yyyy', 'yyyy-mm-dd',\n"

+ . " 'yyyy' or 'x.y'\n"

. " (use first two only for years >= 1800)\n");

return;

}

@@ -1611,15 +1613,23 @@

}

}

else {

+ my $year;

+

if ( ($attrvalue =~ /^\d+$/)

&& ($attrvalue >= 1800)

&& ($attrvalue <= 2030))

{

if ($attribute =~ /^From$/i) {

- $attrvalue = "01/01/" . $attrvalue;

+ if ($DateFormat eq "yyyy-mm-dd") {

+ $attrvalue .= "-01-01";

+ }

+ else { $attrvalue = "01/01/" . $attrvalue; }

}

if ($attribute =~ /^Till$/i) {

- if ($DateFormat eq "dd/mm/yyyy") {

+ if ($DateFormat eq "yyyy-mm-dd") {

+ $attrvalue .= "-12-31";

+ }

+ elsif ($DateFormat eq "dd/mm/yyyy") {

$attrvalue = "31/12/" . $attrvalue;

}

else { $attrvalue = "12/31/" . $attrvalue; }

@@ -1632,7 +1642,11 @@

);

return;

}

- if (substr($attrvalue, 6, 4) < 1800) {

+ if ($DateFormat eq "yyyy-mm-dd") {

+ $year = substr($attrvalue, 0, 4);

+ }

+ else { $year = substr($attrvalue, 6, 4); }

+ if ($year < 1800) {

&Error(

"Period attribute '$attribute' invalid. Specify year >= 1800."

);

@@ -2524,13 +2538,17 @@

}

if ( ($DateFormat eq "dd/mm/yyyy")

- || ($DateFormat eq "mm/dd/yyyy"))

+ || ($DateFormat eq "mm/dd/yyyy")

+ || ($DateFormat eq "yyyy-mm-dd"))

{

if ( ($attrvalue =~ /^\d+$/)

&& ($attrvalue >= 1800)

&& ($attrvalue <= 2030))

{

- $attrvalue = "01/01/" . $attrvalue;

+ if ($DateFormat eq "yyyy-mm-dd") {

+ $attrvalue .= "-01-01";

+ }

+ else { $attrvalue = "01/01/" . $attrvalue; }

}

}

@@ -4300,7 +4318,8 @@

}

else { $script .= " stubs: none\n"; }

- if ($DateFormat !~ /\//) {

+ if ( ($DateFormat eq "yyyy")

+ || ($DateFormat eq "x.y")) {

$script .= " ticincrement: " . $Scales{"$scale inc"} . "\n";

}

else {

@@ -4530,17 +4549,25 @@

return ($true);

}

- if (!($date =~ /^\d\d\/\d\d\/\d\d\d\d$/)) { return ($false); }

-

- if ($DateFormat eq "dd/mm/yyyy") {

- $day = substr($date, 0, 2);

- $month = substr($date, 3, 2);

- $year = substr($date, 6, 4);

+ if ($DateFormat eq "yyyy-mm-dd") {

+ if (!($date =~ /^\d\d\d\d-\d\d-\d\d$/)) { return ($false); }

+ $day = substr($date, 8, 2);

+ $month = substr($date, 5, 2);

+ $year = substr($date, 0, 4);

}

else {

- $day = substr($date, 3, 2);

- $month = substr($date, 0, 2);

- $year = substr($date, 6, 4);

+ if (!($date =~ /^\d\d\/\d\d\/\d\d\d\d$/)) { return ($false); }

+

+ if ($DateFormat eq "dd/mm/yyyy") {

+ $day = substr($date, 0, 2);

+ $month = substr($date, 3, 2);

+ $year = substr($date, 6, 4);

+ }

+ else {

+ $day = substr($date, 3, 2);

+ $month = substr($date, 0, 2);

+ $year = substr($date, 6, 4);

+ }

}

if ($month =~ /^(?:01|03|05|07|08|10|12)$/) {

@@ -4573,6 +4600,17 @@

return ($true);

}

+ if ($DateFormat eq "yyyy-mm-dd") {

+ $day = substr($date, 8, 2);

+ $month = substr($date, 5, 2);

+ $year = substr($date, 0, 4);

+ $dayf = substr($from, 8, 2);

+ $monthf = substr($from, 5, 2);

+ $yearf = substr($from, 0, 4);

+ $dayt = substr($till, 8, 2);

+ $montht = substr($till, 5, 2);

+ $yeart = substr($till, 0, 4);

+ }

if ($DateFormat eq "dd/mm/yyyy") {

$day = substr($date, 0, 2);

$month = substr($date, 3, 2);

@@ -4641,7 +4679,12 @@

my @mmm = (31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);

my ($day, $month, $year);

my $date = shift;

- if ($DateFormat eq "dd/mm/yyyy") {

+ if ($DateFormat eq "yyyy-mm-dd") {

+ $day = substr($date, 8, 2);

+ $month = substr($date, 5, 2);

+ $year = substr($date, 0, 4);

+ }

+ elsif ($DateFormat eq "dd/mm/yyyy") {

$day = substr($date, 0, 2);

$month = substr($date, 3, 2);

$year = substr($date, 6, 4);

@@ -4706,7 +4749,10 @@

$month++;

my $date;

- if ($DateFormat eq "dd/mm/yyyy") {

+ if ($DateFormat eq "yyyy-mm-dd") {

+ $date = sprintf("%04d-%02d-%02d", $year, $month, $day);

+ }

+ elsif ($DateFormat eq "dd/mm/yyyy") {

$date = sprintf("%02d/%02d/%04d", $day, $month, $year);

}

else { $date = sprintf("%02d/%02d/%04d", $month, $day, $year); }

{{collapse bottom}}

:: 84.127.115.190 (talk) 14:12, 8 November 2014 (UTC)

:::Hi! Thanks for your patch! Please use mw:Developer access to submit this as a Git branch directly into Gerrit. Putting your branch in Git makes it easier to review it quickly. If you don't want to set up Git/Gerrit, you can also use the [https://tools.wmflabs.org/gerrit-patch-uploader/ Gerrit Patch Uploader]. Thanks again! --AKlapper (WMF) (talk) 10:28, 10 November 2014 (UTC)

:::: Submitted at bugzilla:73640. 84.127.115.190 (talk) 04:58, 20 November 2014 (UTC)

Alignment

How do I align the timeline as a whole on the wikipage? On the German wiki

does the trick. Here it seems to have no effect. Any help would be appreciated :) Best, Furius (talk) 08:19, 10 October 2014 (UTC)

x.y format

Is there a reason the x.y real-number "date" format isn't documented? --Fru1tbat (talk) 17:19, 5 December 2014 (UTC)

Legend cropped on the right

On this article [https://en.wikipedia.org/w/index.php?title=Pat_Metheny_Group&oldid=662849794#Timeline], the legend is cropped on the right - the "n" in "Percussion" is cut in half, and "Studio releases" becomes "Studio rele". I can fix this by changing "columns:4" to "3", but it would be better if it would be fixed in the feature itself. Could somebody do that? Bonomont (talk) 18:32, 9 June 2015 (UTC)

Font Color

Hi guys,

I am working on Template:Tomb Raider series Timeline.

How do I change the font color?

Cheers!--TudorTulok (talk) 07:28, 29 November 2015 (UTC)

::Solved here textcolor:black. Sorry for putting the question and immediately answering and finding the solution myself. TudorTulok (talk) 07:29, 29 November 2015 (UTC)

Font selection

I understand from the EasyTimeline documentation that any non-default font must be available on the server. In the case of Wikipedia, how do I find out what alternative fonts are available? The default is just horrible: the letter spacing is all uneven. OTOH, this might be a problem with the font rendering, and not something that can be improved easily. (See Classical music#Timeline of composers) Imaginatorium (talk) 11:26, 11 September 2016 (UTC)

Bar height

Hi! I would be grateful if someone could tell me where to find the syntax for the bar dimensions. ATBWikirictor (talk) 02:30, 11 January 2017 (UTC)

Years before 1800

I just drafted a timeline to add to an article relating to the American Revolutionary War. I pasted it into the article, only to discover that EasyTimeline wouldn't run. It doesn't work for years in the 1700s:

{{Block indent |1={{Pre |1={{Red |1=

Line 5: Period = from:06/15/1775 till:12/23/1783

- Period attribute 'from' invalid. Specify year >= 1800.

Line 15: ScaleMajor = unit:year increment:2 start:1775

- Scale attribute 'start' invalid.

}}}}}}

Is this limitation as arbitrary as it appears to be, and could someone please fix it? Lwarrenwiki (talk) 17:35, 15 January 2018 (UTC)

Bug: Additional diagonal lines in Chrome

I can't reproduce it but there are multiple reports that timelines can add strange diagonal lines when used for bands like this. It seems to affect Chrome but not Firefox. [https://i.redd.it/agc2esaceeq31.png Here is a screenshot]. Any idea what causes this and how to get rid of it? --mfb (talk) 23:09, 3 October 2019 (UTC)

Text is blurry when zoomed in

This template should generate 2x images as well https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Responsive_images#resolution_switching_same_size_different_resolutions. The text is noticably blurry when using a page zoom above 100% or using a retina display.

File:Blurry EasyTimeline timeline because of page zoom.png

Akeosnhaoe (talk) 20:39, 1 March 2021 (UTC)

Help needed splitting a line at [[Demographics of the Supreme Court of the United States‎]]

At Demographics of the Supreme Court of the United States‎#Catholic justices, is it possible to plot one line for Edward D. White, split between the two colors representing his time as an associate justice and his time as chief justice? BD2412 T 22:56, 10 March 2021 (UTC)

  • Note: This has been resolved. BD2412 T 19:18, 24 April 2021 (UTC)

Underscores as spaces

: bar

:defines the bar id. Other commands (notably PlotData) will expect this id for reference. This will also be the label to be shown along the axis, unless attribute text is present. The bar id should not contain any spaces: use underscores instead, these will be converted to spaces, as with article titles.

Oh no, they won't!

The underscores continue to show up as underscores. How long has this been a thing? TangoFett (talk) 19:07, 6 October 2023 (UTC)

Adding a reference to this chart

Hey,

is there a way I can add a reference to this chart? Or maybe place a short caption directly below this chart with this reference:{{Cite web |title=iPhone-Verkaufszahlen weltweit bis 2023 |url=https://de.statista.com/statistik/daten/studie/203584/umfrage/absatz-von-apple-iphones-seit-dem-geschaeftsjahr-2007/ |access-date=2023-11-14 |website=Statista |language=de}}

ImageSize=width:270 height:400

PlotArea=left:60 bottom:51 top:10 right:16

AlignBars=justify

Period=from:0 till:250

TimeAxis=orientation:horizontal

Colors=

id:gray value:gray(0.5)

id:line1 value:gray(0.9)

id:line2 value:gray(0.7)

ScaleMajor=unit:year increment:50 start:0 gridcolor:line2

ScaleMinor=unit:year increment:50 start:0 gridcolor:line1

BarData=

bar:2007 text:2007

bar:2008 text:2008

bar:2009 text:2009

bar:2010 text:2010

bar:2011 text:2011

bar:2012 text:2012

bar:2013 text:2013

bar:2014 text:2014

bar:2015 text:2015

bar:2016 text:2016

bar:2017 text:2017

bar:2018 text:2018

bar:2019 text:2019

bar:2020 text:2020

bar:2021 text:2021

bar:2022 text:2022

bar:2023 text:2023

PlotData=

color:tan1 width:10

bar:2007 from:start till:1.3 text:1.3 million

bar:2008 from:start till:11.6 text:11.6 million

bar:2009 from:start till:20.7 text:20.7 million

bar:2010 from:start till:39.9 text:39.9 million

bar:2011 from:start till:72.2 text:72.2 million

bar:2012 from:start till:125 text:125 million

bar:2013 from:start till:150 text:150 million

bar:2014 from:start till:169 text:169 million

bar:2015 from:start till:231 text:231 million

bar:2016 from:start till:211 text:211 million

bar:2017 from:start till:216 text:216 million

bar:2018 from:start till:217 text:217 million

bar:2019 from:start till:185 text:185 million

bar:2020 from:start till:189 text:189 million

bar:2021 from:start till:238 text:238 million

bar:2022 from:start till:239 text:239 million

bar:2023 from:start till:223 text:223 million

TextData=

pos:(70,20) textcolor:gray fontsize:S text:iPhone sales worldwide

TextData=

pos:(70,5) textcolor:gray fontsize:S text:Source:

WikiPate (talk) 16:22, 14 November 2023 (UTC)

{{Reftalk}}

{{clear}}

"[[:EasyTimeline syntax]]" listed at [[Wikipedia:Redirects for discussion|Redirects for discussion]]

30px

The redirect [//en.wikipedia.org/w/index.php?title=EasyTimeline_syntax&redirect=no EasyTimeline syntax] has been listed at redirects for discussion to determine whether its use and function meets the redirect guidelines. Readers of this page are welcome to comment on this redirect at {{slink|Wikipedia:Redirects for discussion/Log/2024 March 14#EasyTimeline syntax}} until a consensus is reached. jlwoodwa (talk) 00:54, 14 March 2024 (UTC)

Display quality

Is it possible to increase the quality of text display in the timeline? Murat Karibay (talk) 00:20, 1 January 2025 (UTC)