Comments (11)
Bumping this issue.
from chartjs-plugin-zoom.
@etimberg ping
from chartjs-plugin-zoom.
@Koshux the industry seems to be moving away from RequireJS towards newer and better technologies like Webpack. Given that there are other ways to make this work, this particular issue isn't really at the top of the priority scale--this plugin has much bigger issues with functionality, as you can see from the issues list. If you need this fixed now, please consider submitting a PR. Thanks!
from chartjs-plugin-zoom.
@Koshux I'm curious to know if this issue also happens with the chartjs-plugin-deferred plugin?
from chartjs-plugin-zoom.
@Koshux can you try with these files: chartjs-plugin-zoom.zip
from chartjs-plugin-zoom.
@simonbrunel I have tried using both files provided in the ZIP file (chartjs-plugin-zoom.js & chartjs-plugin-zoom.min.js) and still encounter the same issue. The working solution is to change the expected module ID from 'require('chart.js')' to 'require('chartjs')'.
from chartjs-plugin-zoom.
Can you share test cases that fail to load chart.js
and another one that work with chartjs
?
from chartjs-plugin-zoom.
Also, if chart.js
is renamed to chartjs
, how this will work with other module loaders?
from chartjs-plugin-zoom.
Bumbing this up since this is a breaking issue with requirejs.
from chartjs-plugin-zoom.
My require.config.js looks like this:
require.config({
paths: {
moment: 'lib/moment.js/moment-with-locales.min',
chartjs: 'lib/chart.js/Chart'
},
map: {
'*': {
'chart.js': 'chartjs'
}
},
shim: {
'chartjs': {
deps: ['moment']
}
}
});
The trick is to map the module-name "chart.js" including the .js-suffix to the module-name "chartjs". This configuration allows RequireJS to load chart.js-plugins without any modification.
from chartjs-plugin-zoom.
I fought with this for hours when trying to use the dragdata extension. I ended up doing the following at the top of my js class to ensure chartjs (2.9.3) is loaded before the dragdata (1.0.2) extension.
require.config({
shim: {
"myapp/js/chartjs/chartjs-plugin-dragdata": ["myapp/js/chartjs/Chart"]
}
});
from chartjs-plugin-zoom.
Related Issues (20)
- LineChart disappears while zooming in if spanGaps: true and non-null datapoints are out of bounds
- minRange for Category HOT 3
- After zooming in too much, straight line shifts upwards HOT 1
- Zooming in over axis does not reset y-axis ticks back to initial limits HOT 1
- import zoomPlugin from 'chartjs-plugin-zoom' causing GET 500 Error but still working HOT 2
- Some ticks disappear when the X axis is moved.
- Zoom reset for scales built with suggestedMin and suggestedMax
- Graph grid and axes jittering when panning on one axis
- getZoomLevel doesn't appear to be exported HOT 1
- Overlap the axis
- Chartjs-plugin-zoom drag issue
- Reduce the number of dependencies HOT 2
- Inconsistent behavior when using limits and new data points
- Changing zoom mode (drag) resets the zoom level
- Pan function does not work properly when there are many points HOT 2
- Zooming in on a line chart on the category axis makes the line disappear
- Disable auto zoom-out after toggling datasets, when clicking on the legend.
- Zoom go to Infinity on any event on chart
- Expose "passive" boolean in the EventListenerOptions dictionary.
- Uncaught (in promise) TypeError: Cannot delete property '_stacks' of #<Chart>
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chartjs-plugin-zoom.