Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Labels cut off - horizontal bar graph
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post will appear after it is approved by moderators
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Nishant rayan  
View profile  
 More options Jul 4 2010, 3:04 pm
From: Nishant rayan <nishantra...@gmail.com>
Date: Mon, 5 Jul 2010 00:34:29 +0530
Local: Sun, Jul 4 2010 3:04 pm
Subject: Labels cut off - horizontal bar graph

Hi,
I am using plotkit 0.9 along with mochkit 1.4.2  to show some stats and
stumbled upon the issue discussed here,
http://groups.google.com/group/plotkit/browse_frm/thread/1a46afbe6533...
As you can see from attachment the labels are cut . If i individually
increase the width (using firebug) the label just overlaps with the bar.

Please let me know if there is anyway to increase label width without
skewing the horizontal axis data..

<script....
function drawGraph() {
            var xTicks = [
                {label: "SampleStatistics1", v: 0},
                {label: "SampleStatistics2", v: 1},
                {label: "SampleStatistics3", v: 2}
            ];

            var layout = new PlotKit.Layout("bar",
{"xTicks":xTicks,"barOrientation":"horizontal",w:1,h:1});
            layout.addDataset("sqrt", [
                ["0", 20],
                ["1", 10],
                ["2", 50],
            ]);
            layout.evaluate();
            var canvas = MochiKit.DOM.getElement("graph");
            var opts = {
                "padding": {left: 50, right: 50, top: 20, bottom: 20},
                "axisLabelFontSize":12
            };

            var plotter = new PlotKit.SweetCanvasRenderer(canvas, layout,
opts);
            plotter.render();

        }

        MochiKit.DOM.addLoadEvent(drawGraph);
</script>

<div style="display:block;" id="bargraph">
    <canvas id="graph" height="300" width="300"></canvas>
</div>

  PlotKit_Issue.JPG
29K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Martin Kleppmann  
View profile  
 More options Jul 10 2010, 6:29 pm
From: Martin Kleppmann <mar...@eptcomputing.com>
Date: Sat, 10 Jul 2010 15:29:25 -0700 (PDT)
Local: Sat, Jul 10 2010 6:29 pm
Subject: Re: Labels cut off - horizontal bar graph
Hi Nishant,

I think the axisLabelWidth option to Renderer should do what you want.
http://ept.github.com/plotkit/doc/PlotKit.Renderer.html

Best,
Martin

On Jul 4, 12:04 pm, Nishant rayan <nishantra...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »