Hi Badtnik,

I noticed that in your old charts package you seemed to be using a
linear scale for values between 0 and 1, and a log scale for values
greater than 1.
But this was fine with me because usually when using a log scale most
data will be greater than 1, and using a linear scale between 0 and 1
is still easily understood by the viewer.
You could improve on this slightly by using something like Log(x+1)
which would work for all data values and the difference in tick
spacing on the axis would be indiscernible.
The way I see it is that the purpose of a log scale is to be able to
view multiple metrics with large differences in magnitude on the same
scale, and this is exactly what your old package provided.

Btw, the logScale on your new corecharts plots data values between 0
and 1 negatively from 1, which is extremely confusing and in my
opinion also unusable.


On Aug 11, 2:39 pm, Badtnik <[email protected]> wrote:
> Hey Adam
>
> Well, There is a major problem with what the old charts used to plot
> considering, log of a positive number smaller than 1 is supposed to be
> negative.
>
> Consider the following data, for example (I added g1 to g4) to your data:
>
>                data.addRow(["a", -1000]);
>                data.addRow(["b", -100]);
>                data.addRow(["c", -10]);
>                data.addRow(["d", -1]);
>                data.addRow(["e", -0.1]);
>                data.addRow(["f", 0]);
>                data.addRow(["g1", 0.0001]);
>                data.addRow(["g2", 0.001]);
>                data.addRow(["g3", 0.01]);
>                data.addRow(["g4", 0.1]);
>                data.addRow(["h", 1]);
>                data.addRow(["i", 10]);
>                data.addRow(["j", 100]);
>                data.addRow(["k", 1000]);
>
> The columns g1 to g4 should be presented as negative, their log is a
> negative number, by doing so the values should form a straight line.
>
> It is true that in the old version it was implemented in a different way,
> plotting 0.1 in a positive location and not plotting g1 - k on one straight
> line, I find that simply inconsistent with what logarithmic scale is - a
> plot of the log of values.
>
>   Badtnik
>
> On Wed, Aug 11, 2010 at 12:33 PM, Adam <[email protected]> wrote:
> > -1000,-100,-10,0,10,100,1000 should be equidistant ticks on the x-axis
> > and should represent these values.
> > What I'm referring to works fine on the old Google Visualization
> > Charts (see my code below).
> > However it doesn't work on the new corecharts.
>
> > <html>
> >  <head>
> >    <script type="text/javascript" src="http://www.google.com/jsapi";></
> > script>
> >    <script type="text/javascript">
> >      google.load("visualization", "1", {packages:["barchart"]});
> >      google.setOnLoadCallback(drawChart);
> >      function drawChart() {
> >        var data = new google.visualization.DataTable();
> >                data.addColumn('string', 'item');
> >                data.addColumn('number', 'sales');
> >                data.addRow(["a", -1000]);
> >                data.addRow(["b", -100]);
> >                data.addRow(["c", -10]);
> >                data.addRow(["d", -1]);
> >                data.addRow(["e", -0.5]);
> >                data.addRow(["f", 0]);
> >                data.addRow(["g", 0.5]);
> >                data.addRow(["h", 1]);
> >                data.addRow(["i", 10]);
> >                data.addRow(["j", 100]);
> >                data.addRow(["k", 1000]);
> >        var chart = new
> > google.visualization.BarChart(document.getElementById('chart_div'));
> >        chart.draw(data, {width: 800, height: 300, logScale:true });
> >      }
> >    </script>
> >  </head>
> >  <body>
> >    <div id="chart_div"></div>
> >  </body>
> > </html>
>
> > On Aug 10, 6:46 pm, Badtnik <[email protected]> wrote:
> > > Hi
>
> > > So you are suggesting the bars should not at all be affected by
> > > logScale=true?
> > > I mean, for what I understand, the purpose of logarithmic scale is indeed
> > to
> > > show a 'distorted' version of the data to help display very large value
> > > alongside very small values. so 0.001 and 10000 can both have reasonably
> > > sized bars representing them instead of the former being less then 1
> > pixel
> > > high.
>
> > > Can you sketch some example of how you would like to see a lograthmic
> > scaled
> > > chart of some example data ?
> > >   Badtnik
>
> > > On Tue, Aug 10, 2010 at 5:23 PM, Adam <[email protected]> wrote:
> > > > Hi Badtnik
>
> > > > I will try to clarify what I meant.
> > > > As an example, let's take a Column Chart with logScale=true.
> > > > In this case the y-axis will be labeled in a logarithmic fashion
> > > > (example 0, 10, 100, 1000 ...)
> > > > However, the column values are not logarithmic - they are the real
> > > > values. So for example, a column having a real value of 1000 will
> > > > correspond to the 1000 y-axis label.
>
> > > > Since the data values are the real data values and not logarithms, I
> > > > don't see any problem having the same method of logarithmic labeling
> > > > of the negative y-axis.
>
> > > > On Aug 10, 12:55 pm, Badtnik <[email protected]> wrote:
> > > > > Hey Adam
>
> > > > > What you are suggesting is interesting but might cause a lot of
> > > > confusion,
> > > > > for example:
> > > > > - the values -10 and 1/10 will be positioned in the same height
> > > > > - the value 0.5 will be positioned lower than -0.5
> > > > > In general, the positioning function you are suggesting is not
> > monotone
> > > > nor
> > > > > is it continuous.
>
> > > > > Wikipedia:http://en.wikipedia.org/wiki/Logarithmic_scaleseemstoonly
> > > > > describe logarithmic scale of positive values
> > > > > Do you have any reference to literature or an example of a well known
> > > > > charting tool that behaves that way?
>
> > > > >   Badtnik
>
> > > > > On Mon, Aug 9, 2010 at 6:30 PM, Adam <[email protected]>
> > wrote:
> > > > > > Why does the logScale configuration option of the Column and Bar
> > > > > > Charts require all values to be positive? (according the the
> > > > > > documentation)
>
> > > > > > There is no reason for negative values not to have a log scale. The
> > > > > > scale should be calculated according to the absolute values of the
> > > > > > data. So the negative log scale would be something similar to -1,
> > -10,
> > > > > > -100, ...
>
> > > > > > --
> > > > > > 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]<google-visualization-api%[email protected]>
> > <google-visualization-api%[email protected]<google-visualization-api%[email protected]>
>
> > > > <google-visualization-api%[email protected]<google-visualization-api%[email protected]>
> > <google-visualization-api%[email protected]<google-visualization-api%[email protected]>
>
> > > > > > .
> > > > > > For more options, visit this group at
> > > > > >http://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]<google-visualization-api%[email protected]>
> > <google-visualization-api%[email protected]<google-visualization-api%[email protected]>
>
> > > > .
> > > > For more options, visit this group at
> > > >http://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]<google-visualization-api%[email protected]>
> > .
> > For more options, visit this group at
> >http://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