Welcome Guest Search | Active Topics |

tooltip bug
rdt
#1 Posted : Saturday, June 01, 2013 5:37:37 AM(UTC)
Rank: Member

Groups: Registered
Joined: 5/16/2013(UTC)
Posts: 16

Thanks: 3 times
Was thanked: 0 time(s) in 0 post(s)
i think you have bug on tooltip when the x axis id date and the time is 00:00
can you check it please

also how can i format it to 24h time?

thank you
Dragan
#2 Posted : Sunday, June 02, 2013 3:59:25 AM(UTC)
Rank: Advanced Member

Groups: Administrators, DataVizJavaScript, jQueryChart, jQueryDV, MvcChart, Registered
Joined: 1/3/2011(UTC)
Posts: 483

Thanks: 0 times
Was thanked: 87 time(s) in 87 post(s)
Hi,

Can you provide us a little more info what is the bug when the time is 00:00?

You can check in this example how the tooltips are customized with the 'tooltipFormat' event:

http://www.jqchart.com/aspnetmvc/chart/

Code:
var date = data[0].chart.stringFormat(data[0].x, "ddd, mmm dS, yyyy");


When the tooltips are not 'shared', you can use 'data', instead of 'data[0]'.

For a full list of date time values formatting, you can check here:

http://www.jqchart.com/documentationAspNetMVC/userguide/Default.aspx#!LabelsFormatting

You can also send us your sample to support@jqchart.com and we'll put the right formatting for you.
Best Regards,
Dragan Matek
jqChart Inc.
1 user thanked Dragan for this useful post.
rdt on 6/2/2013(UTC)
rdt
#3 Posted : Sunday, June 02, 2013 5:17:24 AM(UTC)
Rank: Member

Groups: Registered
Joined: 5/16/2013(UTC)
Posts: 16

Thanks: 3 times
Was thanked: 0 time(s) in 0 post(s)
Dragan
#4 Posted : Sunday, June 02, 2013 6:02:59 AM(UTC)
Rank: Advanced Member

Groups: Administrators, DataVizJavaScript, jQueryChart, jQueryDV, MvcChart, Registered
Joined: 1/3/2011(UTC)
Posts: 483

Thanks: 0 times
Was thanked: 87 time(s) in 87 post(s)
This is intentionally, because usually when the time is 0:00, people want to see only the date. In your case this seems not to be so correct.

Here is the tooltip formatting you can use:

Code:
<script lang="javascript" type="text/javascript">
        $(document).ready(function () {
            $('#jqChart').bind('tooltipFormat', function (e, data) {

                var date = data.chart.stringFormat(data.x, "m/d/yyyy HH:MM");

                var tooltip = '<b>' + date + '</b></br>' +
                      '<span style="color:' + data.series.fillStyle + '">' + data.series.title + ': </span>' +
                      '<b>' + data.y + '</b></br>';

                return tooltip;
            });
        });
    </script>


You need to place it in your page like in this example:

http://www.jqchart.com/aspnetmvc/chart/ChartFeatures/Tooltips
Best Regards,
Dragan Matek
jqChart Inc.
rdt
#5 Posted : Sunday, June 02, 2013 6:23:47 AM(UTC)
Rank: Member

Groups: Registered
Joined: 5/16/2013(UTC)
Posts: 16

Thanks: 3 times
Was thanked: 0 time(s) in 0 post(s)
works wonderful
thank you for the quick response
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

FlatEarth Theme by Jaben Cargman (Tiny Gecko)
Powered by YAF 1.9.4 | YAF © 2003-2010, Yet Another Forum.NET
This page was generated in 0.880 seconds.