Code Monkey home page Code Monkey logo

custom_events's People

Contributors

havunen avatar jermspeaks avatar josejulio avatar mateuszkornecki avatar mfilipiec avatar pawelfus avatar sebastianbochan avatar tisba avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

custom_events's Issues

Can't remove PlotBands

Hi,

It seems that when using this plugin, the Axis is unable to remove PlotBands programatically:

In my code, i have a function that is frequently called to remove and redraw a plot band. Here it is:

function setPlotbands(min, max) {
    var axis = Chart.xAxis[0];
    axis.removePlotBand('selection'); --> Does not remove previously added plot band
    axis.addPlotBand({
        id:'selection',
        from: min,
        to: max,
    })
    console.log(axis.plotLinesAndBands); --> always returns [ ]
}

When i disable the plugin, i can see the plotLinesAndBands array getting populated, and the function works as expected.

The problem is shown Here

Safari 8 both "contextmenu" and "click" functions are called

Safari 8 show different behaviour from Chrome when using both "contextmenu" and "click" on an object. With Chrome only the "contextmenu" function get's called whereas with Safari 8 both functions get called.

I'd like a click on an object to go to one url vs a right click to a different url. This functions correctly in Chrome but in Safari the "click" action gets called instead.

In the demo the feedback message flashes between both messages using Safari.

3d touch

Internal note
Check force property on the event arguments

plotbands rendering issue

example: http://jsfiddle.net/kdragon/ogc7hucq/4/

notice the xaxis plotbands are being rendered a second time, on the yaxis.

the labels are on the lower left of the chart, u can drag to zoom in to get a better visual of what is going on

it is corrected if i remove: <script src="http://blacklabel.github.io/custom_events/customEvents.js"></script>

commenting this out in customEvents also fixes:

if (redraw) {
chart.yAxis[i].update({
plotLines: plotLines,
// plotBands: plotBands
}, false);
}

not sure what the correct fix is though

thanks
Keith

Drag on x null element (fix suggested)

When dragging a point in the x axis, when it is within .1 of an existing x point, the code breaks since the element is returned as null. The fix I have found is to not add the event if the elemPoint is also !null on line 184

if (elementPoint[j].y &&
elemPoint !== UNDEFINED &&
elemPoint !== NULL) {
customEvent.add(elemPoint, eventsPoint, elementPoint[j]);
}

Errors if axis configs not present

It seems like this plugin throws errors if your chart config doesn't have both xAxis and yAxis properties. Here's an example using the highcharts sample fiddle: http://jsfiddle.net/op8f14fe/1/. You can see the error in the browser console.

Also, even if both properties are present it looks like we're expecting them to always be arrays but Highcharts allows them to be single objects when there's only one axis:

// This is OK
xAxis: [{
  // ...
}],

// But this causes issues
yAxis: {
  // ...
}

And sorry to be a pest ๐Ÿ˜„ but one more small thing. On lines 71-72 should the 'A' be capitalized? It seemed to always be that way when I was stepping through, e.g. 'xAxis' vs 'xaxis'.

Highstock Scrollbar not stopping when custom events are used

Hi, I'm using highchart to display some data using column stacks , point markers and a highstock scrollbar. I also added click event on point to display other data with highslide popup effect in this way:

//click function
click: function (e) {
hs.htmlExpand(null, {
pageOrigin: {
x: e.pageX || e.clientX,
y: e.pageY || e.clientY
},
headingText: this.series.name,
maincontentText: this.x + '(x)
' +
this.y + ' (y)' + '
',
width: 200
});
}

When the scrollbar is moved in the right direction so that the yellow column stack disappear (x > 2580) it become uncontrollable. The scrollbar keep moving and doesn't stop. From that moment on, the scrollbar cannot be stopped unless it comes back in the left direction to values with x < 2580.

This bug is related to the usage of custom events. If we remove the related line

<script src="customEvents.js" type="text/javascript"></script>

the scrollbar works but the click event doesn't.

The script can be found here: http://jsfiddle.net/vb77a6tk/3/

Any help, please?

Accessing label value

Is there a way to access the value/name of the point/label that was clicked? I was able to access it through the default click event before through this.value/this.name but since adding the plugin, this feature has been broken. Thanks

Uncaught TypeError: Cannot set property 'isDirty' of undefined

Getting error "Uncaught TypeError: Cannot set property 'isDirty' of undefined" when rendering a Pie chart.

Seems like the if statement was removed:
if (chart.hasOwnProperty("xAxis") && chart.xAxis.length > 0) { chart.xAxis[0].isDirty = true; }

Putting it back would fix the issue.
Thanks!

Distorted display in FireFox and Safari

When the JS file (from GitHub), I see a "gap" (empty area), is the start of all my bars.
You can see an example here:
http://jsfiddle.net/uvthpuun/

I have ONLY seen this bug in FireFox and safari, Chrome display the chart correctly.
I have also attached a screen-shot of what I see with the problem.

screen shot 2015-07-16 at 09 22 37

Mousedown event on chart object

This is def an enhancement request

Would it be possible to allow CustomEvents also on Chart object? I'd like to catch a mousedown event when zooming is initiated (mousedown on chart - so I can hide tooltip).

If I've understood this plugin correctly I cannot achieve this by adding mousedown event to any of the supported objects?

Thanks for a great plugin!
Jens

Cannot read property 'clip' of undefined

After adding custom events to my page I get the following error and no charts are drawn:

Uncaught TypeError: Cannot read property 'clip' of undefined : http://10.26.0.125/pfm/Scripts/highcharts.js : 228

The code is inside the animation function and is calling b.group.clip(a).
I am using verison 3.0.10 of highcharts.

Changing to highcharts 3.0.7 gave me a different error about userOptions["xAxis"] not being defined

Not working with bubble charts?

(First, thanks for the excellent plugin!)

I encountered an issue while trying to get contextmenu events on bubble chart series points. The bubble chart type requires highcharts-more to be included on the page.

It seems that loading highcharts-more before customEvents causes the extra events to no longer be recognized. However, including customEvents before higcharts-more fixes the issue. I haven't done any investigation but perhaps the issue lies in highcharts-more rather than this plugin.

Here is an example of the plugin working with bubble charts, and here is an example of the extra events not being honored.

Custom events destroy hide events

I have a chart with a custom hide event. Adding the custom_event.js file this events will not work anymore.

The bug happens in line 19501 (series[key][showOrHide]()) of highcharts.js

      // show or hide elements
     each(['group', 'dataLabelsGroup', 'markerGroup', 'tracker'], function (key) {
       if (series[key]) {
         series[key][showOrHide]();
       }
     });

Fiddle: http://jsfiddle.net/gm7ecvh2/

So the problem is that series[key] should be a function but is true, which is set in the custom_event.js in line 142.

trouble getting contextmenu events from flags in stockchart

i can't figure out how to get contextmenu events for flags, and adding customevents.js causes my click events to stop working

i tried adding my events{} section to various places in the config, and wasn't able to get it to work. i have been able to successfully get contexmenu events from other charts and series, just not flags. wondering if something is needed in the customevents code to add support to flags, as is done for plotbands and some other highchart constructs.

here is my unsuccessful attempt at getting contextmenu events from flags: http://jsfiddle.net/kdragon/gqmfocax/

comment out the customevents include and the click events will work

thanks
Keith

mouseup event

Looking to do a drag and drop on a chart for an xAxis label to do a reorder. Any chance to add the mouseup event?

It doesn't work with HighStock

When i use this Plugin with highstock,
There is an error : Uncaught TypeError: Cannot read property 'plotLines' of undefined .

Clippaths wrong size - markers aren't visible

See here:
http://jsfiddle.net/yhLwgmh4/

Resizing the chart after load is part of the problem, also the point rendering outside the viewable area of the chart (parent container clipping) seems related too.

I have confirmed that without the custom events plugin included the markers are visible, also when the clippaths are explicitly set after the resize.

Dblclick event in touch devices not working

Hello.

I'm using customEvents v1.1.8 and it seems not work on touch devices. I've tested the dblclick event. In desktop works fine, but in touch devices won't.

Is there any fix for this issue?

Thank you very much.

Use semver tags?

It looks like you've already got semantic version numbers going in your manifest.json file - would you be willing to tag the repo with that version number as well (i.e. v.1.0.3) so folks using bower can target specific versions?

Memory Leak

Hi,

When i use custom-event, the events are no more detached.

you can do in reset function

plotBands[j].events = null;
-->> removeEvent(plotBands[j]);

Have fun,
Jbm

Uncaught TypeError: serie.group.clip is not a function

Using version 1.1.0 and rendering a pie chart I'm seeing the above error thrown from line 31 (or line 76 on a redraw)

I don't understand the logic but the problem is caused by the customEvent.add method setting a boolean true for each event property on the serie.group element, which blocks the serie.group.prototype.clip function from being invoked.

How I know which item I have clicked on legend

Hi guys, I have an doubt, how could I know which item I clicked on legend Item, e.g., I have 2 series on legend and I want to know if that item I clicked and know if that item are visible or unvisible,

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.