Hi,<br><br>I pushed my work. What I tried was to convert each of the date into UNIX timestamp, which generated milliseconds passed since 1970-01-01 00:00:00. I used the inbuit php function to str2time() for that and while testing I found out that it does not supports dates before 1970 ( ideally it should have given negative value). I then worked around to convert date into timestamp in my javascript code. The date object in js does not support the timestamp data type from MySQL, so conversion to and from had to be done manually. I had to use the library at [0] for parsing a string to timestamp. It now provides a meaningful distance measure between dates. I lost a bit of time working around this, will work on panning feature now.<br>
<br>[0] <a href="http://www.mattkruse.com/javascript/date/source.html">http://www.mattkruse.com/javascript/date/source.html</a><br><br><div class="gmail_quote">On Tue, Aug 2, 2011 at 10:55 PM, Ammar Yasir <span dir="ltr"><<a href="mailto:ayax88@gmail.com">ayax88@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br><br><div class="gmail_quote"><div class="im">On Tue, Aug 2, 2011 at 10:24 PM, Marc Delisle <span dir="ltr"><<a href="mailto:marc@infomarc.info" target="_blank">marc@infomarc.info</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Ammar,<br>
<br>
Zoom-search of date values needs improvement. Here is an example table:<br>
<br>
CREATE TABLE IF NOT EXISTS `birthday` (<br>
`id` int(11) NOT NULL AUTO_INCREMENT,<br>
`name` varchar(50) NOT NULL,<br>
`birthday` date NOT NULL,<br>
PRIMARY KEY (`id`)<br>
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;<br>
<br>
<br>
INSERT INTO `birthday` (`id`, `name`, `birthday`) VALUES<br>
(1, 'A', '1950-01-01'),<br>
(2, 'B', '1950-02-02'),<br>
(3, 'C', '1960-03-03'),<br>
(4, 'D', '2000-04-04');<br>
<br>
Generating a plot via zoom-search show that the same time elapsed<br>
between two days (in 1950) than in ten or forty years.<br>
<br>
If you could convert these dates to a number of days (probably at the<br>
Javascript layer), the same way than in MySQL [0], you would get<br>
meaningful results. Of course you still need to display the unconverted<br>
date value.<br>
<br>
[0]<br>
<a href="http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_to-days" target="_blank">http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_to-days</a><br>
<br></blockquote></div><div>I looked up in the reference manual and I think Highcharts will do that automatically ( calculate distance between dates) if we can convert the date into specific format, like the <u>dateFormat</u> function specified [0] will probably work. <br>
I'll need to have cases for each of the date and time types in MySQL [1] ( format to be chosen accordingly, like for datetime: '%e. %b %Y, %H:%M:%S' and for year: ' %Y ' only)<br><pre></pre>[0] <a href="http://www.highcharts.com/ref/#highcharts-object" target="_blank">http://www.highcharts.com/ref/#highcharts-object</a><br>
[1] <a href="http://dev.mysql.com/doc/refman/5.0/en/date-and-time-types.html" target="_blank">http://dev.mysql.com/doc/refman/5.0/en/date-and-time-types.html</a><br><br></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">
--<div class="im"><br>
Marc Delisle<br>
<a href="http://infomarc.info" target="_blank">http://infomarc.info</a><br>
<br>
------------------------------------------------------------------------------<br>
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA<br>
The must-attend event for mobile developers. Connect with experts.<br>
Get tools for creating Super Apps. See the latest technologies.<br>
Sessions, hands-on labs, demos & much more. Register early & save!<br>
<a href="http://p.sf.net/sfu/rim-blackberry-1" target="_blank">http://p.sf.net/sfu/rim-blackberry-1</a><br>
_______________________________________________<br>
Phpmyadmin-devel mailing list<br>
<a href="mailto:Phpmyadmin-devel@lists.sourceforge.net" target="_blank">Phpmyadmin-devel@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel</a><br>
</div></blockquote></div><br>
<br>------------------------------------------------------------------------------<br>
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA<br>
The must-attend event for mobile developers. Connect with experts.<br>
Get tools for creating Super Apps. See the latest technologies.<br>
Sessions, hands-on labs, demos & much more. Register early & save!<br>
<a href="http://p.sf.net/sfu/rim-blackberry-1" target="_blank">http://p.sf.net/sfu/rim-blackberry-1</a><br>_______________________________________________<br>
Phpmyadmin-devel mailing list<br>
<a href="mailto:Phpmyadmin-devel@lists.sourceforge.net">Phpmyadmin-devel@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel</a><br>
<br></blockquote></div><br>