Welcome Guest Search | Active Topics |

Bind to Mouse Down with Markers: Null
GameBench
#1 Posted : Tuesday, August 12, 2014 4:27:27 AM(UTC)
Rank: Newbie

Groups: jQueryDV, Registered
Joined: 8/7/2014(UTC)
Posts: 9

Thanks: 3 times
Was thanked: 0 time(s) in 0 post(s)
Not sure if this is a bug, but I'm unable to bind mouse events to a line series chart with markers set to null (even though when hovering, the marker appears).

Is there any way of binding with markers set to null, or do I just need to remove the Markers: null aspect?

Thanks,
Jake

(I promise this should be one of the last questions I need to ask :P)
Dragan
#2 Posted : Tuesday, August 12, 2014 5:14:51 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)
Recently, we fixed such issue, but it is not released officially yet. I sent you a working version via email. Please, let us know if it is ok.
Best Regards,
Dragan Matek
jqChart Inc.
GameBench
#3 Posted : Tuesday, August 12, 2014 5:28:40 AM(UTC)
Rank: Newbie

Groups: jQueryDV, Registered
Joined: 8/7/2014(UTC)
Posts: 9

Thanks: 3 times
Was thanked: 0 time(s) in 0 post(s)
Received the file - I hate to say it, but it hasn't fixed the issue. Here is my code:

Code:
function genChart() {
                        $('#fpschartdiv').jqChart({
                                title: { text: 'Frames Per Second (FPS)', font: '18px sans-serif' },
                                axes: [{
                                        location: 'bottom',
                                        zoomEnabled: true,
                                        labels: {
                                            resolveOverlappingMode: 'hide',
                                        },
                                        visibleMinimum: 1,
                                        visibleMaximum: 70
                                }],
                                border: { strokeStyle: '#6ba851' },
                                background: '#FFFFFF',
                                tooltips: {
                                      type: 'shared'
                                },
                                crosshairs: {
                                        enabled: true,
                                        hLine: false,
                                        vLine: { strokeStyle: '#cc0a0c' }
                                },
                                series: []
                        });
setupFPSChart()
}

function setupFPSChart() {
        var series = $('#fpschartdiv').jqChart('option', 'series');
        $.ajax({
                url: '<?php echo $api;?>/appServer/gbReader/Session/fpsvals/<?php echo $hash;?>/',
                dataType: 'json',
                success: function(data2) {
                        var newSeries = {
                            type: 'line',
                            title: "Frames Per Second",
                            data: convertFPS(data2),
                            xValuesField: {
                                name: 'timestamp',
                            },
                            yValuesField: {
                                name: 'fpsValue',
                                type: 'numeric',
                            },
                                markers: null
                        }
                        series.push(newSeries);
                        var median = {
                                type: 'line',
                                title: 'Median FPS',
                                data: convertMed(data2),
                                xValuesField: {
                                        name: 'timestamp',
                                },
                                yValuesField: {
                                        name: 'median',
                                        type: 'numeric'
                                },
                                markers: null
                        }
                        series.push(median);
                        $('#fpschartdiv').jqChart('update');
                }
        });
        $('#fpschartdiv').bind('dataPointMouseDown', function (e, data) {
                var secs = backToSeconds(data.dataItem[0]);
                updateSS(<?php echo $hash;?>,secs);
        });
        $('#fpschartdiv').bind('tooltipFormat', function (e, data) {
                return "Time: "+data[0].x+"<br />FPS: "+data[0].y+ "<br />Median FPS: "+data[1].y;
        });
}

Dragan
#4 Posted : Tuesday, August 12, 2014 5:50: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)
I see. Well, in this case you can set hide the markers with:
Code:
markers: {
          fillStyle: 'transparent',
          strokeStyle: 'transparent'
}
Best Regards,
Dragan Matek
jqChart Inc.
1 user thanked Dragan for this useful post.
GameBench on 8/18/2014(UTC)
GameBench
#5 Posted : Monday, August 18, 2014 5:36:24 AM(UTC)
Rank: Newbie

Groups: jQueryDV, Registered
Joined: 8/7/2014(UTC)
Posts: 9

Thanks: 3 times
Was thanked: 0 time(s) in 0 post(s)
Thanks again - I've implemented that for now. Sorry for the late response, just got back from a conference in Germany.

Take care,
J
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.224 seconds.