These are two different questions.
Let's separate the discussion.
1. Can line chart support a value based X axis?
The answer is no, because this is the common use of a line chart. A scatter
chart can have a line, and that it on our feature request list, but a line
chart is almost always category based. Look in Microsoft Excel for instance,
and you'll see a similar behavior.
2. Can line chart support a number datatype even though it treats it as
category/label based?
In this case, it's a more delicate question.
Usually you can circumvent this problem by casting to String in the
javascript.
It is also in our roadmap to add a means in the query langauge to do type
casting.
Do you still see this as a needed feature to support numbers?
Regards,
VizBoy.
On Mon, May 18, 2009 at 12:12 PM, Felix Halim <[email protected]> wrote:
>
> Hi VizBoy,
>
> Is there a way to have a LineChart that have value based for X axis
> (just like ScatterChart)?
>
> Why the design restricts the X values to be string?
> I don't see what's wrong to have 'number' as the first column?
>
> Can you enlighten me on this?
>
> Thanks,
>
> Felix Halim
>
> On Mon, May 18, 2009 at 4:44 PM, VizBoy <[email protected]> wrote:
> > Hi,
> >
> > This is by design.
> > The X axis in line chart is category based while the X axis in scatter
> chart
> > is value based.
> >
> > - VizBoy.
> >
> > On Wed, May 13, 2009 at 5:28 PM, Felix Halim <[email protected]>
> wrote:
> >>
> >> Since the first column in the LineChart data format corresponds to X
> axis,
> >> forcing the first column to be string (while its actually of type
> >> number) will force all values on X axis to be spread out evenly
> >> instead of according to the number.
> >>
> >> ScatterChart allows the first column to be of type number.
> >> Why forcing the LineChart first column to be of type string?
> >>
> >> Is there any work around to get the visualization treat the first
> >> column as number?
> >>
> >> Thanks,
> >>
> >> Felix Halim
> >>
> >>
> >
> >
> > >
> >
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---