Plan B: just clone the whole table but change the string type column
to a numeric. And use that cloned table for the chart. I have used
that approach on several occasions.

On Nov 28, 4:44 am, Lukáš Kubín <[email protected]> wrote:
> Thanks chrissky. I can't add another column into the table, however,
> since it would be plotted in my chart as another series.
> I'm looking for some way how to use the LineChart or AreaChart without
> having to use a string-type column for x-asis. Or maybe a method of
> DataTable or DataView to sort string column by numeric indexes.
>
> kukacz
>
> On Sun, Nov 28, 2010 at 2:16 AM, chrissky <[email protected]> wrote:
> > Just add a numeric column to the table and copy the strings values by
> > row. Then sort on that column.
>
> > On Nov 27, 5:41 pm, kukacz <[email protected]> wrote:
> >> Hi,
> >> I need to sort a datatable, where first column is of a string type. It
> >> has to be a string since I'm creating a chart, where the first
> >> column's data form a x-axis series. The problem is the actual data of
> >> that column have numeric meaning.
>
> >> Still however, I wish to be able to resort the table dynamically while
> >> keeping the correct numeric order of rows, not a string order. Is
> >> there some way how to do this?
>
> >> Just to illustrate the unwanted behaviour, following column:
> >> 512
> >> 1024
> >> 4096
>
> >> is being incorrectly resorted by string algorithm to:
> >> 1024
> >> 4097
> >> 512
>
> >> Thank you.
>
> >> kukacz
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "Google Visualization API" group.
> > To post to this group, send email to 
> > [email protected].
> > To unsubscribe from this group, send email to 
> > [email protected].
> > For more options, visit this group 
> > athttp://groups.google.com/group/google-visualization-api?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-visualization-api?hl=en.

Reply via email to