Welcome Guest Search | Active Topics |

Tooltip is wrong because of markers
Junya
#1 Posted : Wednesday, July 24, 2013 7:15:47 PM(UTC)
Rank: Member

Groups: jQueryChart, Registered
Joined: 6/3/2013(UTC)
Posts: 13

Thanks: 1 times
Was thanked: 0 time(s) in 0 post(s)
When a marker was displayed on the chart(even if marker size is 0) and a mouse cursor was moved slightly, the data of the next plot was displayed on a tooltip.



The problem occurs only when the interval of the plot is narrow, and if a marker is not displayed, it is not occur.
Is this a bug? Is there a way for me to avoid this problem?

Thanks,

Code:
    <script lang="javascript" type="text/javascript">
    var _JQCHARTDATA = null;

    function generateChartData() {
        var firstDate = new Date(2013, 0, 1, 00, 00);
        firstDate.setHours(0, 0, 0, 0);

        _JQCHARTDATA = new Array(2);

        for (var i = 0; i < 2; i++) {
            _JQCHARTDATA[i] = new Array(100);

            for (var j = 0; j < 100; j++) {
                var newDate = new Date(firstDate);
                newDate.setDate(newDate.getDate() + j);
                var value = (15 * i) + (Math.random() * 10) - 5;
                _JQCHARTDATA[i][j] = [newDate, value];
            }   
        }
    }

    function createJqChart() {
        $('#_jqchart').jqChart({
            selectionRect: {
                fillStyle: 'rgba(255,0,0,0.25)',
                strokeStyle: 'red',
                lineWidth: 0
            },
            axes: [
                    {
                        location: 'bottom',
                        type: 'dateTime',
                        zoomEnabled: true
                    },
                    {
                        location: 'left'
                    }
                  ],
            tooltips: {
                type: 'shared'
            },
            crosshairs: {
                enabled: true,
                hLine: false,
                vLine: { strokeStyle: '#cc0a0c' }
            },
            legend: {
                location: 'bottom'
            },
            series: [
                     {
                         title: 'Value1',
                         type: 'line',
                         data: _JQCHARTDATA[0],
                         lineWidth : 1,
                         markers: { size: 0 }
                         //markers: null
                     },
                     {
                         title: 'Value2',
                         type: 'line',
                         data: _JQCHARTDATA[1],
                         lineWidth : 1,
                         markers: { size: 0 }
                         //markers: null
                     }
                    ]
        });               
    }

    jQuery(function () {
        generateChartData();
        createJqChart();
        $('#_jqchart').resizable();

    });
    </script>

</head>
<body>
    <div id="_jqchart" style="width:300px; height:300px; background-color:#FFFFFF"></div>
</body>
</html>
Dragan
#2 Posted : Thursday, July 25, 2013 12:39:29 PM(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)
We were able to reproduce this issue and we're working on it. I'll let you know when we're ready.
Best Regards,
Dragan Matek
jqChart Inc.
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.082 seconds.