Forum Stats

  • 3,769,955 Users
  • 2,253,036 Discussions


Support for interactivity on the trend lines

Subhash Chandra-Oracle
Subhash Chandra-Oracle Member Posts: 3 Employee
edited Dec 15, 2015 10:45AM in Oracle JET


I have gone through the example which shows displaying trend line in Custom Charts. In the previous thread, it's clarified that you recommended using the reference objects in this example to show the trend lines as the interactivity(like selecting,dragging or zooming) is not desirable on the trend lines. Is there any other way to show the trend lines which allows the interactivity. We have a requirement where we are expected to capture the data points on the trend line by dragging the cursor over the line as shown in the below image. The value of the data point will be used as an input to determine the data for the other chart which is expected to dynamically update. As per the knowledge I gained by going through the documentation, I feel this is something not readily available. As my knowledge in java script is intermediate level, I just wanted confirm whether it is possible to achieve this with the JET charts. If so, can you please provide any pointers which will help in the implementation.





  • Hugh Zhang-Oracle
    Hugh Zhang-Oracle Member Posts: 193 Employee
    edited Dec 15, 2015 10:45AM

    Hi Subhash,

    In that case, the trend line can be added as an additional series. This will give you access to all of the interactivity that we support in the chart. If you find that you need custom interactivity that isn't built in, please see the JSDoc: Class: ojChart for the getContextByNode API, which provides details on DOM nodes that have been interacted with. One thing to keep in mind is that we don't support any direct modification of the DOM that we generate, as we will make changes to take advantage of new features in HTML or SVG in the future.

    Hope this helps,