I need to add a vertical line and a text on my Line chart near to a specified point on chart (specified by data, not coordinates). I tried to use CompositeSprites, but it doesn’t show on screen completely. I’m new to ExtJS drawing.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You should put the logic that adds the vertical line inside of the chart’s
refreshevent listener, that way, if the data changes the line position will be updated to reflect the new data.Here’s an example of how you could do it, assuming you can get a reference to the chart container (e.g. “myPanel”):
If you are using the MVC pattern your event handler would look a little different (you wouldn’t use
myChart.on()).