Help talk:EasyTimeline syntax
![]() | This help page does not require a rating on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | ||||||||||
|
Meta:Help:EasyTimeline syntax authors and history
|
---|
|
Timeline or Graph?
editAre 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
editI 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
editHi.
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 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
editMore 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:
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); }
|
- 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 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)
- 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 Gerrit Patch Uploader. Thanks again! --AKlapper (WMF) (talk) 10:28, 10 November 2014 (UTC)
- 84.127.115.190 (talk) 14:12, 8 November 2014 (UTC)
Alignment
editHow do I align the timeline as a whole on the wikipage? On the German wiki <div class="float-right"> 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
editIs 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
editOn this article [1], 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
editHi 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
editI 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
editHi! 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
editI 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:
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
editI 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. 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
editThis 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.
Help needed splitting a line at Demographics of the Supreme Court of the United States
editAt 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
edit- 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
editHey,
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:[1]
![](http://upload.wikimedia.org/wikipedia/en/timeline/4c2dv3dth39d7byomizsbw1iavz98nu.png)
WikiPate (talk) 16:22, 14 November 2023 (UTC)
References
- ^ "iPhone-Verkaufszahlen weltweit bis 2023". Statista (in German). Retrieved 2023-11-14.
Adding multiple wikilinks in TextInput
editHow do I wikilink to multiple internal pages in the same line in a given "bar"? See timeline. Tried using quotes ("") and underscore (_) between Bob Bryan and Mike Bryan per Help:EasyTimeline syntax#Text input, but did not give the intended result. Qwerty284651 (talk) 03:28, 10 February 2024 (UTC)
"EasyTimeline syntax" listed at Redirects for discussion
editThe redirect 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 Wikipedia:Redirects for discussion/Log/2024 March 14 § EasyTimeline syntax until a consensus is reached. jlwoodwa (talk) 00:54, 14 March 2024 (UTC)