ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  Discrete frequency spectrum
Posted by Kamil on Oct-21-2021 17:08
Hi All. I am looking for a way to display frequency spectrum of DFT transform. The chart should looks like scatter chart with vertical lines that link x-axis with points of scatter chart. However I didn't find a way to draw these lines in scatter chart (I know this is possible in 3D scatter chart by using setDropLine()  method but it is unavailable in 2D chart).
I was also trying to display it in 3D scatter chart with setViewAngle(0,0) to "emulate" 2D chart but this solution also doesn't work as expected: the values on vertical axis is behind the chart (in other words not displayed properly) and the thick cross sections of borders doesn't look fine to me.
So my question is: is there any type of chart that is dedicated for frequency spectrum displaying or any way to force these existing types of charts to meet my needs?
Thank you in advance.

  Re: Discrete frequency spectrum
Posted by Peter Kwan on Oct-22-2021 03:38
Hi Kamil,

You can use another layer to draw the vertical lines. For example, you can use a bar layer, with the bar set to 1 pixel wide and have no bar border. In this way, the bar looks like a vertical line. The bar can use the same data as the scatter layer. As a result, the top of the bar will be the position of the scatter symbols.

Another method is to draw the lines with a line layer. For each scatter symbol, you add 3 points to the line layer:

(a) The point at the position of the scatter symbol
(b) The point at the x-axis
(c) A NoValue point

The above will draw a vertical line for the scatter layer. The NoValue point ensures the multiple vertical line segments in the line layer will not be joined together.

Regards
Peter Kwan