Hi Mirfan,
Basically the trendline would render along with the financial series and should not be affected by the other series. However to help you further with this I need to reproduce the behavior on my side, so please make sure you provide those:
- is the trendline part of the financial series, or you use a separate series to draw the trendline ?
- what is the type of the X axis - is it category or categoryDateTime ?
I will try to prepare a sample following those options. Anyway it would be best if you could provide your sample that I can work on and suggest accordingly.
Hello Hristo, Thank you for your message. Yes I am generating separate series for Trends and x-axis type is CategoryX. My Data Object have following properites; var obj = {}; obj.Date = date; obj.Close = 12.2; obj.High = 14.5; obj.Low = 10.1; obj.Open = 10.7; obj.Volume = 12231; obj.Price = 12.5; //use for line series Now you can put loop from 0 to 100 and generate value for all above properties....then in next loop, only generate value for "Price" & "Date" and leave other properties as NaN. Here are the code snippet for generated Trends: $("#chart").igDataChart("option", "series", [{ type: newIndicator, showTooltip: false, name: newIndicator, title: indicator, xAxis: "xAxis", yAxis: "yAxis2", closeMemberPath: "Close", highMemberPath: "High", lowMemberPath: "Low", openMemberPath: "Open", volumeMemberPath: "Volume" }]); NOTE: We have added all possible trends in DropDown so whatever user select we add it...so "newIndicator" is the selected value/Trend.
Thank you for sharing your solution with other community members !
Ok, I guess I have found the solution. May be it help for someone, so solution is to select "dataSource" of trend series explicitly when defining Trend.
It solve my problem.
Thank you.