Jump to content
Software FX Community

Problems with DataSource and X-Axis


User (Legacy)

Recommended Posts

I have a DataTable that is represented as follows

string double double double double

12:34:08 0 0.4 0.71 287.16

etc

As far as I can gather, the first column is the what will be represented as

the x-axis and the other values will be used as data series.

When I change the DataSource to

double double double double

0 0.4 0.71 287.16

by removing the first column (I want to use the new first column as the

x-axis) it still some how remember the time string values and uses them for

x-axis.

How can I make it plot what I want as the x-axis.

Adjusting the DataType does not seem to help.

Link to comment
Share on other sites

I have a DataTable that is represented as follows

string double double double double

12:34:08 0 0.4 0.71 287.16

etc

As far as I can gather, the first column is the what will be represented as

the x-axis and the other values will be used as data series.

When I change the DataSource to

double double double double

0 0.4 0.71 287.16

by removing the first column (I want to use the new first column as the

x-axis) it still some how remember the time string values and uses them for

x-axis.

How can I make it plot what I want as the x-axis.

Adjusting the DataType does not seem to help.

Link to comment
Share on other sites

DataType[0] = DataType.Label;

Should do the trick, make sure this is done BEFORE the data is read into the

chart.

--

Francisco Padron

www.chartfx.com

"Jim Bob" <goatee01@hotmail.com> wrote in message

news:1FjEp45tFHA.1332@webserver3.softwarefx.com...

>I have a DataTable that is represented as follows

> string double double double double

> 12:34:08 0 0.4 0.71 287.16

> etc

>

> As far as I can gather, the first column is the what will be represented

> as the x-axis and the other values will be used as data series.

>

> When I change the DataSource to

>

> double double double double

> 0 0.4 0.71 287.16

> by removing the first column (I want to use the new first column as the

> x-axis) it still some how remember the time string values and uses them

> for x-axis.

>

> How can I make it plot what I want as the x-axis.

> Adjusting the DataType does not seem to help.

>

Link to comment
Share on other sites

DataType[0] = DataType.Label;

Should do the trick, make sure this is done BEFORE the data is read into the

chart.

--

Francisco Padron

www.chartfx.com

"Jim Bob" <goatee01@hotmail.com> wrote in message

news:1FjEp45tFHA.1332@webserver3.softwarefx.com...

>I have a DataTable that is represented as follows

> string double double double double

> 12:34:08 0 0.4 0.71 287.16

> etc

>

> As far as I can gather, the first column is the what will be represented

> as the x-axis and the other values will be used as data series.

>

> When I change the DataSource to

>

> double double double double

> 0 0.4 0.71 287.16

> by removing the first column (I want to use the new first column as the

> x-axis) it still some how remember the time string values and uses them

> for x-axis.

>

> How can I make it plot what I want as the x-axis.

> Adjusting the DataType does not seem to help.

>

Link to comment
Share on other sites

I'm afraid I don't understand this problem.

What is the data that you have in your table ? The labels will appear in the

order in which they are in your data, if you want them to be ascending you

need to sort your dataset, remember these are labels (strings) not numbers

so Chart FX doesn't have a numeric value for them.

If what you are looking for is to use this columns as X values, X/Y charts

are a feature of the full version of Chart FX not present in Chart FX Lite.

--

Francisco Padron

www.chartfx.com

"Jim Bob" <goatee01@hotmail.com> wrote in message

news:p$lIfJ0uFHA.280@webserver3.softwarefx.com...

> Using ClearData and Setting DataType to Label has partly solved the

> problem but has uncovered another. It plots the x-axis using the correct

> values but they are not in ascending order which is not really useful.

>

> Included is an example of what I get.

> 0 30.41 0.71 0.71 0.71 26.17 0 0 0.71 0.71

> instead of

> 0 0.71 26.17 30.41

>

>

Link to comment
Share on other sites

I'm afraid I don't understand this problem.

What is the data that you have in your table ? The labels will appear in the

order in which they are in your data, if you want them to be ascending you

need to sort your dataset, remember these are labels (strings) not numbers

so Chart FX doesn't have a numeric value for them.

If what you are looking for is to use this columns as X values, X/Y charts

are a feature of the full version of Chart FX not present in Chart FX Lite.

--

Francisco Padron

www.chartfx.com

"Jim Bob" <goatee01@hotmail.com> wrote in message

news:p$lIfJ0uFHA.280@webserver3.softwarefx.com...

> Using ClearData and Setting DataType to Label has partly solved the

> problem but has uncovered another. It plots the x-axis using the correct

> values but they are not in ascending order which is not really useful.

>

> Included is an example of what I get.

> 0 30.41 0.71 0.71 0.71 26.17 0 0 0.71 0.71

> instead of

> 0 0.71 26.17 30.41

>

>

post-2107-13922382493429_thumb.jpg

post-2107-13922386182975_thumb.jpg

Link to comment
Share on other sites

That is what I was after, having them sorted. Now i just have to work out a 

way to sort the dataset. I can't expect Software FX to help if it has to do

with datatable class being sorted. Anyone else want to help though. i've

tried using table.select but that doesn't seem to do anything. All i want to

do is sort a datatable by the first column ascending and set as chartfx.lite

datasource.

"Software FX Support" <noreply@softwarefx.com> wrote in message

news:6u%23c3t4uFHA.280@webserver3.softwarefx.com...

> I'm afraid I don't understand this problem.

>

> What is the data that you have in your table ? The labels will appear in

> the order in which they are in your data, if you want them to be ascending

> you need to sort your dataset, remember these are labels (strings) not

> numbers so Chart FX doesn't have a numeric value for them.

>

> If what you are looking for is to use this columns as X values, X/Y charts

> are a feature of the full version of Chart FX not present in Chart FX

> Lite.

>

> --

> Francisco Padron

> www.chartfx.com

>

>

> "Jim Bob" <goatee01@hotmail.com> wrote in message

> news:p$lIfJ0uFHA.280@webserver3.softwarefx.com...

>> Using ClearData and Setting DataType to Label has partly solved the

>> problem but has uncovered another. It plots the x-axis using the correct

>> values but they are not in ascending order which is not really useful.

>>

>> Included is an example of what I get.

>> 0 30.41 0.71 0.71 0.71 26.17 0 0 0.71 0.71

>> instead of

>> 0 0.71 26.17 30.41

>>

>>

>

>

Link to comment
Share on other sites

That is what I was after, having them sorted. Now i just have to work out a 

way to sort the dataset. I can't expect Software FX to help if it has to do

with datatable class being sorted. Anyone else want to help though. i've

tried using table.select but that doesn't seem to do anything. All i want to

do is sort a datatable by the first column ascending and set as chartfx.lite

datasource.

"Software FX Support" <noreply@softwarefx.com> wrote in message

news:6u%23c3t4uFHA.280@webserver3.softwarefx.com...

> I'm afraid I don't understand this problem.

>

> What is the data that you have in your table ? The labels will appear in

> the order in which they are in your data, if you want them to be ascending

> you need to sort your dataset, remember these are labels (strings) not

> numbers so Chart FX doesn't have a numeric value for them.

>

> If what you are looking for is to use this columns as X values, X/Y charts

> are a feature of the full version of Chart FX not present in Chart FX

> Lite.

>

> --

> Francisco Padron

> www.chartfx.com

>

>

> "Jim Bob" <goatee01@hotmail.com> wrote in message

> news:p$lIfJ0uFHA.280@webserver3.softwarefx.com...

>> Using ClearData and Setting DataType to Label has partly solved the

>> problem but has uncovered another. It plots the x-axis using the correct

>> values but they are not in ascending order which is not really useful.

>>

>> Included is an example of what I get.

>> 0 30.41 0.71 0.71 0.71 26.17 0 0 0.71 0.71

>> instead of

>> 0 0.71 26.17 30.41

>>

>>

>

>

Link to comment
Share on other sites

I have it sorted but there are duplicate values. any way to get rid of 

duplicates?

"Jim Bob" <goatee01@hotmail.com> wrote in message

news:bSf3b3MvFHA.280@webserver3.softwarefx.com...

> That is what I was after, having them sorted. Now i just have to work out

> a way to sort the dataset. I can't expect Software FX to help if it has to

> do with datatable class being sorted. Anyone else want to help though.

> i've tried using table.select but that doesn't seem to do anything. All i

> want to do is sort a datatable by the first column ascending and set as

> chartfx.lite datasource.

>

>

> "Software FX Support" <noreply@softwarefx.com> wrote in message

> news:6u%23c3t4uFHA.280@webserver3.softwarefx.com...

>> I'm afraid I don't understand this problem.

>>

>> What is the data that you have in your table ? The labels will appear in

>> the order in which they are in your data, if you want them to be

>> ascending you need to sort your dataset, remember these are labels

>> (strings) not numbers so Chart FX doesn't have a numeric value for them.

>>

>> If what you are looking for is to use this columns as X values, X/Y

>> charts are a feature of the full version of Chart FX not present in Chart

>> FX Lite.

>>

>> --

>> Francisco Padron

>> www.chartfx.com

>>

>>

>> "Jim Bob" <goatee01@hotmail.com> wrote in message

>> news:p$lIfJ0uFHA.280@webserver3.softwarefx.com...

>>> Using ClearData and Setting DataType to Label has partly solved the

>>> problem but has uncovered another. It plots the x-axis using the correct

>>> values but they are not in ascending order which is not really useful.

>>>

>>> Included is an example of what I get.

>>> 0 30.41 0.71 0.71 0.71 26.17 0 0 0.71 0.71

>>> instead of

>>> 0 0.71 26.17 30.41

>>>

>>>

>>

>>

>

>

Link to comment
Share on other sites

I have it sorted but there are duplicate values. any way to get rid of 

duplicates?

"Jim Bob" <goatee01@hotmail.com> wrote in message

news:bSf3b3MvFHA.280@webserver3.softwarefx.com...

> That is what I was after, having them sorted. Now i just have to work out

> a way to sort the dataset. I can't expect Software FX to help if it has to

> do with datatable class being sorted. Anyone else want to help though.

> i've tried using table.select but that doesn't seem to do anything. All i

> want to do is sort a datatable by the first column ascending and set as

> chartfx.lite datasource.

>

>

> "Software FX Support" <noreply@softwarefx.com> wrote in message

> news:6u%23c3t4uFHA.280@webserver3.softwarefx.com...

>> I'm afraid I don't understand this problem.

>>

>> What is the data that you have in your table ? The labels will appear in

>> the order in which they are in your data, if you want them to be

>> ascending you need to sort your dataset, remember these are labels

>> (strings) not numbers so Chart FX doesn't have a numeric value for them.

>>

>> If what you are looking for is to use this columns as X values, X/Y

>> charts are a feature of the full version of Chart FX not present in Chart

>> FX Lite.

>>

>> --

>> Francisco Padron

>> www.chartfx.com

>>

>>

>> "Jim Bob" <goatee01@hotmail.com> wrote in message

>> news:p$lIfJ0uFHA.280@webserver3.softwarefx.com...

>>> Using ClearData and Setting DataType to Label has partly solved the

>>> problem but has uncovered another. It plots the x-axis using the correct

>>> values but they are not in ascending order which is not really useful.

>>>

>>> Included is an example of what I get.

>>> 0 30.41 0.71 0.71 0.71 26.17 0 0 0.71 0.71

>>> instead of

>>> 0 0.71 26.17 30.41

>>>

>>>

>>

>>

>

>

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...