<div dir="ltr">Hi Paul and Esteban, <div><br><div>thank you. Yes, I already figured it out and I had another point to find out for my dashboard:</div><div>How to create a bar graph with labels centered(!) below(!) the bars like this: </div><div><br></div><div><a href="http://goo.gl/zIQ4TY" target="_blank" rel="nofollow" link="external">http://goo.gl/zIQ4TY</a>.</div></div><div><br></div><div>I created an example and if you want, you can add it to your examples.</div><div>code below.</div><div><br></div><div>Regards</div><div>Sabine</div><div><br></div><div><div>renderExampleBarGraph2On: html</div><div><span class="" style="white-space:pre">        </span>| graph xAxis |</div><div><span class="" style="white-space:pre">        </span>html div</div><div><span class="" style="white-space:pre">                </span>class: &#39;chart&#39;;</div><div><span class="" style="white-space:pre">                </span>id: html nextId.</div><div><span class="" style="white-space:pre">        </span>graph := Rickshaw graph element: html lastId.</div><div><span class="" style="white-space:pre">        </span>graph beBar.</div><div><span class="" style="white-space:pre">        </span>graph</div><div><span class="" style="white-space:pre">                </span>addSeriesNamed: &#39;Demo&#39;</div><div><span class="" style="white-space:pre">                </span>color: &#39;steelblue&#39;</div><div><span class="" style="white-space:pre">                </span>elements:</div><div><span class="" style="white-space:pre">                        </span>{(1 @ 49).</div><div><span class="" style="white-space:pre">                        </span>(2 @ 38).</div><div><span class="" style="white-space:pre">                        </span>(3 @ 30).</div><div><span class="" style="white-space:pre">                        </span>(4 @ 32).</div><div><span class="" style="white-space:pre">                        </span>(5 @ 22).</div><div><span class="" style="white-space:pre">                        </span> </div><div><span class="" style="white-space:pre">                        </span> }.</div><div><span class="" style="white-space:pre">        </span>graph optionAt: &#39;height&#39; put: &#39;250&#39;.</div><div><span class="" style="white-space:pre">        </span>graph optionAt: &#39;width&#39; put: &#39;300&#39;.</div><div><span class="" style="white-space:pre">        </span>html div</div><div><span class="" style="white-space:pre">                </span>class: &#39;xaxis&#39;;</div><div><span class="" style="white-space:pre">                </span>style: &#39;margin-left: 25px;&#39;;</div><div><span class="" style="white-space:pre">                </span>id: html nextId.</div><div><span class="" style="white-space:pre">        </span>xAxis := graph xAxis element: html lastId.</div><div><span class="" style="white-space:pre">        </span>xAxis</div><div><span class="" style="white-space:pre">                </span>optionAt: &#39;tickFormat&#39;</div><div><span class="" style="white-space:pre">                </span>put:</div><div><span class="" style="white-space:pre">                        </span>(&#39;switch (x) {case 1: return &#39;&#39;Jan&#39;&#39;;case 2: return &#39;&#39;Feb&#39;&#39;;case 3: return &#39;&#39;Mar&#39;&#39;;case 4: return &#39;&#39;Apr&#39;&#39;;case 5: return &#39;&#39;May&#39;&#39;}&#39;</div><div><span class="" style="white-space:pre">                                </span>asFunction: #(&#39;x&#39;)).</div><div><span class="" style="white-space:pre">        </span>xAxis optionAt: &#39;orientation&#39; put: &#39;bottom&#39;.</div><div><span class="" style="white-space:pre">        </span>xAxis optionAt: &#39;ticks&#39; put: &#39;5&#39;.</div><div><span class="" style="white-space:pre">        </span>html script: graph , xAxis</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2014-09-18 22:18 GMT+02:00 Esteban A. Maringolo [via Smalltalk] <span dir="ltr">&lt;<a href="/user/SendEmail.jtp?type=node&node=4779310&i=0" target="_top" rel="nofollow" link="external">[hidden email]</a>&gt;</span>:<br><blockquote style='border-left:2px solid #CCCCCC;padding:0 1em' class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">

        sh*t!
<br>I didn&#39;t see your last post Sabine. I&#39;m sorry! :(
<br><br>Paul&#39;s suggestion should work fine.
<br><br><br>Regards!
<br><br><br>Esteban A. Maringolo
<br><br><br></span>2014-09-18 1:34 GMT-03:00 Paul DeBruicker &lt;<a href="http://user/SendEmail.jtp?type=node&amp;node=4778835&amp;i=0" rel="nofollow" link="external" target="_blank">[hidden email]</a>&gt;:
<div><div><div class="h5"><div class='shrinkable-quote'><br>&gt; Hi Sabine,
<br>&gt;
<br>&gt;
<br>&gt;
<br>&gt; This works:
<br>&gt;
<br>&gt;
<br>&gt;         xAxis
<br>&gt;                 optionAt: &#39;tickFormat&#39;
<br>&gt;                 put:
<br>&gt;                         (&#39;switch (x) {case 1: return &#39;&#39;Sun&#39;&#39;;case 2: return &#39;&#39;Mon&#39;&#39;;case 3:
<br>&gt; return &#39;&#39;Tue&#39;&#39;;case 4: return &#39;&#39;Wed&#39;&#39;;case 5: return &#39;&#39;Thu&#39;&#39;;case 6: return
<br>&gt; &#39;&#39;Fri&#39;&#39;;case 7: return &#39;&#39;Sat&#39;&#39;;}&#39;
<br>&gt;                                 asFunction: #(&#39;x&#39;)).
<br>&gt;
<br>&gt;
<br>&gt;
<br>&gt;
<br>&gt; Hope you&#39;ve already figured it out.
<br>&gt;
<br>&gt;
<br>&gt; Paul
<br>&gt;
<br>&gt;
<br>&gt;
<br>&gt;
<br>&gt;
<br>&gt;
<br>&gt;
<br>&gt; Sabine Knöfel wrote
<br>&gt;&gt; Hi Esteban,
<br>&gt;&gt;
<br>&gt;&gt; I just tried your wrapper for rickshaw and it is great. I am excited about
<br>&gt;&gt; it and I will use it for creating a dashboard for my application. Thank
<br>&gt;&gt; you for implementing this!
<br>&gt;&gt;
<br>&gt;&gt; There is one point, I did not succeed with:
<br>&gt;&gt; Putting labels/strings at the x axis instead of numbers.
<br>&gt;&gt; e.g. a bar graph with &quot;Monday&quot;, &quot;Tuesday&quot; etc. in the x axis instead of
<br>&gt;&gt; 1,2,3
<br>&gt;&gt;
<br>&gt;&gt; This post describes exactly my problem:
<br>&gt;&gt; <a href="http://stackoverflow.com/questions/13266941/display-custom-labels-on-x-axis-with-rickshaw-js-library/14652472#14652472" rel="nofollow" link="external" target="_blank">http://stackoverflow.com/questions/13266941/display-custom-labels-on-x-axis-with-rickshaw-js-library/14652472#14652472</a><br>&gt;&gt;
<br>&gt;&gt; I extended one of your examples and tried to add the tickformat option.
<br>&gt;&gt; But this did not work. I have spent some time with other experiments to
<br>&gt;&gt; solve this but in the end I did not succeed.
<br>&gt;&gt;
<br>&gt;&gt; So, I ask you for help ;-)
<br>&gt;&gt;
<br>&gt;&gt; This ist my code which does not work, it displays the function code
<br>&gt;&gt; instead of &quot;Mon&quot;, &quot;Tue&quot; etc..
<br>&gt;&gt;
<br>&gt;&gt; renderExampleStackedBarGraph3On: html
<br>&gt;&gt;       | graph theAxis|
<br>&gt;&gt;       html div
<br>&gt;&gt;               class: &#39;chart&#39;;
<br>&gt;&gt;               id: html nextId.
<br>&gt;&gt;       graph := Rickshaw graph element: html lastId.
<br>&gt;&gt;       graph beBar.
<br>&gt;&gt;       graph
<br>&gt;&gt;               addSeries:
<br>&gt;&gt;                               (RickshawSeries
<br>&gt;&gt;                                               color: &#39;steelblue&#39;
<br>&gt;&gt;                                               elements:
<br>&gt;&gt;                                                       {(1 @ 40).
<br>&gt;&gt;                                                       (2@ 49).
<br>&gt;&gt;                                                       (3@ 38).
<br>&gt;&gt;                                                       (4 @ 30).
<br>&gt;&gt;                                                       (5 @ 32)});
<br>&gt;&gt;               addSeriesNamed: &#39;With name&#39;
<br>&gt;&gt;                       color: &#39;lightblue&#39;
<br>&gt;&gt;                       elements:
<br>&gt;&gt;                               {(1 @ 40).
<br>&gt;&gt;                                                       (2@ 49).
<br>&gt;&gt;                                                       (3@ 38).
<br>&gt;&gt;                                                       (4 @ 30).
<br>&gt;&gt;                                                       (5 @ 32)}.
<br>&gt;&gt;       theAxis := graph  xAxis.
<br>&gt;&gt;       theAxis optionAt: &#39;pixelsPerTick&#39; put: &#39;400&#39;.
<br>&gt;&gt;       theAxis optionAt: &#39;tickFormat&#39; put: &#39;function(x) {switch (x) {case 1:
<br>&gt;&gt; return &#39;&#39;Mon&#39;&#39;;case 2: return &#39;&#39;Tue&#39;&#39;;case 3: return &#39;&#39;Wed&#39;&#39;;case 4:
<br>&gt;&gt; return &#39;&#39;Thu&#39;&#39;;case 5: return &#39;&#39;Fri&#39;&#39;;case 6: return &#39;&#39;Sat&#39;&#39;;case 7:
<br>&gt;&gt; return &#39;&#39;Sun&#39;&#39;;}}&#39;.
<br>&gt;&gt;       html script: graph asJavascript , theAxis asJavascript
<br>&gt;&gt; #################
<br>&gt;&gt; the other example was
<br>&gt;&gt;  e.g. <a href="http://code.shutterstock.com/rickshaw/examples/x_axis.html" rel="nofollow" link="external" target="_blank">http://code.shutterstock.com/rickshaw/examples/x_axis.html</a><br>&gt;&gt; with:
<br>&gt;&gt; theTimeAxis optionAt: &#39;tickFormat&#39; put: &#39;function(n) {var map = {0:
<br>&gt;&gt; &#39;&#39;zero&#39;&#39;,1: &#39;&#39;first&#39;&#39;,2: &#39;&#39;second&#39;&#39;,3: &#39;&#39;third&#39;&#39;};return map[n];}&#39;.
<br>&gt;&gt;
<br>&gt;&gt; but this does not work either.
<br>&gt;&gt;
<br>&gt;&gt; regards
<br>&gt;&gt; Sabine
<br>&gt;
<br>&gt;
<br>&gt;
<br>&gt;
<br>&gt;
<br>&gt; --
<br>&gt; View this message in context: <a href="http://forum.world.st/ANN-Rickshaw-js-charting-library-for-Seaside-tp4749681p4778714.html" rel="nofollow" link="external" target="_blank">http://forum.world.st/ANN-Rickshaw-js-charting-library-for-Seaside-tp4749681p4778714.html</a><br>&gt; Sent from the Seaside General mailing list archive at Nabble.com.
<br>&gt; _______________________________________________
<br>&gt; seaside mailing list
</div></div></div>&gt; <a href="http://user/SendEmail.jtp?type=node&amp;node=4778835&amp;i=1" rel="nofollow" link="external" target="_blank">[hidden email]</a>
<br>&gt; <a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" rel="nofollow" link="external" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a></div>_______________________________________________
<br>seaside mailing list
<br><a href="http://user/SendEmail.jtp?type=node&amp;node=4778835&amp;i=2" rel="nofollow" link="external" target="_blank">[hidden email]</a>
<br><a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" rel="nofollow" link="external" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>

        
        
        
        <br>
        <br>
        <hr noshade size="1" color="#cccccc">
        <div style="color:#444;font:12px tahoma,geneva,helvetica,arial,sans-serif">
                <div style="font-weight:bold">If you reply to this email, your message will be added to the discussion below:</div>
                <a href="http://forum.world.st/ANN-Rickshaw-js-charting-library-for-Seaside-tp4749681p4778835.html" target="_blank" rel="nofollow" link="external">http://forum.world.st/ANN-Rickshaw-js-charting-library-for-Seaside-tp4749681p4778835.html</a>
        </div>
        <div style="color:#666;font:11px tahoma,geneva,helvetica,arial,sans-serif;margin-top:.4em;line-height:1.5em">
                To start a new topic under Seaside General, email <a href="/user/SendEmail.jtp?type=node&node=4779310&i=1" target="_top" rel="nofollow" link="external">[hidden email]</a> <br>
                To unsubscribe from Seaside, <a href="" target="_blank" rel="nofollow" link="external">click here</a>.<br>
                <a href="http://forum.world.st/template/NamlServlet.jtp?macro=macro_viewer&amp;id=instant_html%21nabble%3Aemail.naml&amp;base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&amp;breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml" rel="nofollow" style="font:9px serif" target="_blank" link="external">NAML</a>
        </div></blockquote></div><br></div>


        
        
        
<br/><hr align="left" width="300" />
View this message in context: <a href="http://forum.world.st/ANN-Rickshaw-js-charting-library-for-Seaside-tp4749681p4779310.html">Re: [ANN] Rickshaw.js charting library for Seaside</a><br/>
Sent from the <a href="http://forum.world.st/Seaside-General-f86180.html">Seaside General mailing list archive</a> at Nabble.com.<br/>