Jump to content
Software FX Community

Bind the Boxplot chart with Crosstab


jamesraynet

Recommended Posts

Hi,

I have the datatable with this content:

Date  Price

1/1/2006 5.21/1/2006 4.21/1/2006 3.12/1/2006 5.32/1/2006 3.32/1/2006 2.3..................

I need to use the BoxPlot to graph the data.To do that, I need my data to be like this format:

1/1/2006   2/1/2006--------------------------------------------------------------------5.2   5.34.2   2.3.................-----------------

Each date becomes each column.

Question: How do I use the Crosstab data provider to bind the data i have

with the chart and statistical object?

 Please help

 

 

 

 

 

 

 

 

 

 

 

Link to comment
Share on other sites

You need one more field that will link your points together. For example:

1/1/2006 1 5.21/1/2006 2 4.21/1/2006 3 3.12/1/2006 1 5.32/1/2006 2 3.32/1/2006 3 2.3

This way Chart FX will know that the first and fourth record are to be plotted as point 1 in the chart.

Link to comment
Share on other sites

  • 3 weeks later...

Is there another way to do this?  Given the dataset above, enough data is present to generate a box plot.  It seems generically if you have two columns, one being a string, the second numeric, the obvious thing to do is to group by the string column (by number of distinct row values) and then generate the box plot based on the numeric data.  I have a datatable with two columns as described above and I am looking for an easy way to generat the box plot based - can you advise?  I really don't want to create another datatable with unique IDs (esp. when they would be the same values as the string column).  I tried using a cross tab with the row and column set to the same column - that didn't fly with the control. 

Thanks for any adivse you can offer.

Sincerely,

Chadwick

Link to comment
Share on other sites

You will need to set the data using the Data API (no databinding). This way you have complete control over each point and series.

For example:

chart1.Data.Series = <number of boxplot bars>;

chart1.Data.Points = <number of data points per box plot>;

for (...) {

  chart1.Data[<box plot index>, <data point index>] = <value>;

}

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...