i want to detect the patterns in time series
Not specific enough question.
You could try MLTK https://splunkbase.splunk.com/app/2890/
i want to draw a circle or something to define the pattern in the line chart this is available in splunk