Comments (5)
@daraeman could make a PR to include this feature maybe, it would be great!
from chartjs-plugin-crosshair.
Has anyone resolved this?
from chartjs-plugin-crosshair.
Not to my knowledge @jclusso
from chartjs-plugin-crosshair.
@CreativeCoders actually this guys version adds an option drawUnderChart
that fixes this.
from chartjs-plugin-crosshair.
Here's is a very simple workaround, if you have the plugin globally registered in ChartJS:
// Fix for crosshair plugin drawing over the chart and tooltip
let crosshairPlugin = Chart.registry.plugins.get("crosshair");
const afterDraw = crosshairPlugin.afterDraw.bind(crosshairPlugin);
crosshairPlugin.afterDraw = function (chart, args, options) {};
crosshairPlugin.afterDatasetDraw = function (chart, args, options) {
afterDraw(chart, args, options);
};
This plugin is rendering the crosshair during the afterDraw
state which is triggered after the tooltip has been rendered. This workaround moves the rendering logic to the afterDatasetDraw
function instead.
from chartjs-plugin-crosshair.
Related Issues (20)
- Spent hours but couldn't get it to working... Help Needed... HOT 2
- Links to Documentation are broken HOT 1
- Get dot on vertical line HOT 1
- Module '"chartjs-plugin-crosshair"' has no exported member 'CrosshairPlugin' and Interpolate HOT 6
- Unhandled Runtime Error TypeError: Cannot read properties of undefined (reading 'syncEventHandler') HOT 1
- error TS2339: Property 'interpolate' does not exist on type 'InteractionModeMap' HOT 1
- Working solution for modern chart.js setup (React) HOT 2
- Compatibility with Chart.js 4.x
- Cannot read properties of undefined (reading 'enabled') at Object.afterDraw HOT 6
- Is this repo still maintained? HOT 2
- Plugin does not support dynamic scale keys
- Disable and enable crosshair HOT 1
- Hi i use plugin chartjs angular, i have error chart.crosshair is undefined how to fix this HOT 1
- How to update zoomed graph datapoints if dataset is is shifted in x axis ?
- Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'syncEventHandler')
- Vertical line not showing in the second chart while hover on the first chart. HOT 3
- s/xscaleType/xScaleType
- What is the status of this library for the Angular wrapper (ng2-charts)?
- Follow Mouse with Pan
- Sync is not working HOT 24
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-crosshair.