1

Further to the question here, I realized using li won't work best for me & hence upon further research & following the example here, I've manged to implement a customized version of draggable div.
In the example (quoted in the answer of the question mentioned above), moving the scroll bar of the chart doesn't move the chart. However, implementing the charting by making the div that contains the chart draggable according to (link), trying to scroll the scroll bar movs the div & with it the chart.

In (link), I've commented out the code inside the sortable function as I don't need it which makes it look as below

$(function () {
    $(".grid").sortable({
        /*tolerance: 'pointer',
        revert: 'invalid',
        placeholder: 'span2 well placeholder tile',
        forceHelperSize: true*/
    });
});

In addition, to make the chart not to move when scrolled, I tried adding the below code

$(function () {
    $(".grid").sortable({
        /*tolerance: 'pointer',
        revert: 'invalid',
        placeholder: 'span2 well placeholder tile',
        forceHelperSize: true*/
        cancel: ".amcharts-main-div"
    });
});
 $(". grid" ).disableSelection();

However, adding the "cancel" & disableSelection() makes the chart immovable.

This is tricky situation. Could I request some guidance on clubbing these two functionalities namely making the div draggable & also when the chart's scroll bar is moved the chart shouldn't move please?

Community
  • 1
  • 1
usert4jju7
  • 1,653
  • 3
  • 27
  • 59
  • How about just disabling drag on scrollbar grips? `cancel: ".amcharts-scrollbar-grip-left,.amcharts-scrollbar-grip-right"` Please note that you will also need to add `addClassNames: true` to your chart config if you want this to work. – martynasma Jan 20 '16 at 12:26
  • I used the `
  • ` tag in the quoted answer just because I was using a template from the jQueryUI examples. You can just swap the list items with divs. [Click me!](http://codepen.io/anon/pen/qbpEVd?editors=011)
  • – gerric Jan 20 '16 at 12:36
  • Hey Martyn - Thank you for this. Somehow it doesn't work. – usert4jju7 Jan 20 '16 at 21:37
  • Hey Gerric - Appreciate this. Your solution helped. Could you post it as the answer please? I'll accept it as a solution. – usert4jju7 Jan 20 '16 at 21:37
  • Hi @usert4jju7, I'm glad to help, although it would have been sufficient to post this question as comment on the last question, because its pretty specific dependend. Feel free to ask more questions if you're facing new problems. And btw martynasmas name is actually Martynas not just Martyn ;) – gerric Jan 21 '16 at 08:13
  • Thank you so much. :) I'm new to this whole javascript & amcharts. So my questions may sound silly. I request you honor them as you've been. It will help me upskill myself. Thank you very much again :) – usert4jju7 Jan 21 '16 at 08:18
  • Hello Martyna/Gerric/Others - Would be able to take a look at http://stackoverflow.com/questions/34573240/amcharts-asynchronous-plot-plot-chart-as-the-corresponding-sql-query-result in case you have time. Stuck quite badly with that. – usert4jju7 Jan 26 '16 at 06:44