Closed DAmrGharieb closed 3 years ago
Hey @DAmrGharieb,
thanks for raising an issue. It looks like your code snippet was copied out of a project of yours, unfortunately I can't (easily) reproduce the issue this way. Would it be possible for you to create a minimum working example showcasing your problem in a jsFiddle or Codepen?
Without digging too deep, I can see that you define your chart as a 'linear' type (which, to the best of my knowledge, doesn't exist in Chart.js), while your datasets seem to be defined as scatters. Are you intending to have a mixed chart? In order to drag along the x-axis your Chart type cannot be of a 'line' type. Please refer to this example if this is the type of chart you are intending to reproduce: https://jsfiddle.net/rqbcs6ep/1/
But that's just guesswork, an actual example would really help me understand your issue here :) Best Christoph
i will work to produce the issue to jsfiddle .. but the problem is that when the x- axis is a date time the drag plugin doesnot work while when i converted to numbers it work ... i am make an algorithm to estimate the decline with days so i need to have on x asix dates not numbers ... i hope i delivered the idea to you properly
best regards Amr
Hey @DAmrGharieb,
in another issue, we just came up with a work-around for using a linear x-axis "disguised" as a date-axis: https://jsfiddle.net/f72kz348/9/
This allows dragging values along both the x and y-axis. I'll close this as answered using this work-around, please re-open in case the issue persist.
hi Chris , i try to move the point over the x axis but the chart does not response even when i converted the x axis to numbers not dates and if you can give me a work around to move over date x scale it will be benefit for me
` let options = { type: 'linear', data: { // labels: this.data.map(x => this.datepipe.transform(x[0], 'dd-MMM-yyyy')), labels: this.data.map(x => x[3]),