blacklabel / custom_events Goto Github PK
View Code? Open in Web Editor NEWCustom events plugin for Highcharts by Black Label
Home Page: http://blacklabel.github.io/custom_events/
License: Other
Custom events plugin for Highcharts by Black Label
Home Page: http://blacklabel.github.io/custom_events/
License: Other
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 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.
Internal note
Check force property on the event arguments
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
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]);
}
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'
.
From the latest jsFiddle Demo (http://jsfiddle.net/BlackLabel/Utx8g/), it seems that events (click, dblclick, contextmenu) for the y-axis title doesn't trigger.
It was working up until v1.1.0: http://jsfiddle.net/Utx8g/534/
NOTE: the tag was 1.1.0 but on the file (https://github.com/blacklabel/custom_events/blob/v1.1.0/customEvents.js) it was 1.0.9
Thank you!
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?
Example: http://jsfiddle.net/Utx8g/398/
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
useHTML breaks events on datalabels.
Add compatibility with grouped-categories extension.
Add gulp with linting task using eslint.
Issue with events per particular points.
Adding this disables the default animations. Is there a way to keep them? Example here: http://speedcurve.com/site/1/chrome/1/7/qfrcrmxw50s0z2jjlnm53kh28jq2j8/
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!
Add support for:
Please create a new release to allow bower installations.
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.
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
Series point click not working after a certain maximum no of points. https://jsfiddle.net/m8r6vtn6/1
in this after removing one data point from series it starts working.
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
With the highcharts-standalone only the click event is fire on chart:
Series and point "this" object is wrong.
(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.
highcharts.js:27 Uncaught TypeError: Cannot read property 'call' of null
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.
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
On the demo page there's no response when right clicking on any of the elements with custom events registered. In other browsers right clicks are correctly reported.
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?
When i use this Plugin with highstock,
There is an error : Uncaught TypeError: Cannot read property 'plotLines' of undefined .
Click event is attached only on a single point.
Browser:
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.
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.
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?
Support for stackLabels
neither the click nor contextMenu events work at the series level of flags. if u remove the customEvent.js script, click events will work. they work fine at the plotOptions level, but that means that they are applied to all series.
Custom event firing chart event once when i click on plot are in chart (2D ) but if i am converting my chart into 3D its firing chart click event not only for plot area but also beyond the plot area.
2D: http://jsfiddle.net/Utx8g/460/
3D: http://jsfiddle.net/Utx8g/459/
Example: http://jsfiddle.net/Utx8g/167/
Happens when I download to any format in highcharts, pdf, image.
http://jsfiddle.net/q46WQ/
more details here
http://stackoverflow.com/questions/22623255/why-do-i-get-a-null-reference-error-when-i-export-highcharts/22623936?noredirect=1#comment34465277_22623936
Add support for datalabes in highmaps
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
When we call print action, animation should be disabled.
missing axis title event
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.
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,
As in the highcharts , please include the double click event on the highmaps to
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.