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

Message ListMessage List     Post MessagePost Message

  SctterChart/BubbleChart Axis with Dates
Posted by SAM on Mar-07-2018 03:29
Hi,

As per documentation the X/Y axis the data should represent as double[] in scatterlayer/Bubble, But If i want to represent y-axis as Dates and x-axis as strings can i use Scatterlayer? I have attached the chart which i have to implement, But couldn't decide which chart to pick,  Please suggest me.

  Re: SctterChart/BubbleChart Axis with Dates
Posted by SAM on Mar-07-2018 03:32
Attaching the Image

  Re: SctterChart/BubbleChart Axis with Dates
Posted by SAM on Mar-07-2018 03:41
Attachments:
Attaching the image
Untitled.png

  Re: SctterChart/BubbleChart Axis with Dates
Posted by Peter Kwan on Mar-07-2018 18:51
Hi SAM,

Yes, you can use dates as the coordinates. In any ChartDirector API, if the API only accepts "double[]" but you want to use Dates, you can use Chart.CTime to convert th the Dates to the double[]. (By "Date", I assume you are referring to the "Date" according to the programming language, such as System.DateTime in .NET and java.util.Date in Java.)

For text strings, you can use text string as x-axis labels, but not as coordinates. It is because text strings can be non-unique (in many charts, the x-axis labels can duplicate), and text strings cannot be "interpolated" (that means you cannot specify a position in between two text strings). Instead, for the x-coordinates, please use the array indexes of the x-axis labels. For example, the first label position is x = 0, the second label position is x = 1 and so on. You can use fractional numbers to specify a position in between two labels (eg. x = 2.5 is in the middle of label 3 and label 4).

Hope this can help.

Regards
Peter Kwan