Re: Using BarChart in a Widget
- To: mathgroup at smc.vnet.net
- Subject: [mg56558] Re: Using BarChart in a Widget
- From: David Bailey <dave at Remove_Thisdbailey.co.uk>
- Date: Fri, 29 Apr 2005 03:19:58 -0400 (EDT)
- References: <d4kl1t$edj$1@smc.vnet.net><d4mrr2$1u9$1@smc.vnet.net> <d4q1s1$ohb$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Brett Patterson wrote:
> Hi David,
>
> Thanks for the reply.
>
> Perhaps you could tell me what's wrong with the bar orientation in the
> following:
>
> GUIRun[Widget["Panel", {
>
> Widget["MathPanel", {"preferredSize" ->
> Widget["Dimension", {"width" -> 300, "
> height" -> 300}]}, Name -> "zplot",
> WidgetLayout -> {"Stretching" -> {True, Maximize}}],
>
> BindEvent["componentResized", Script[updateZernikes[]]],
>
> Script[updateZernikes[] := Block[{$DisplayFunction = Identity},
> Needs["Graphics`Graphics`"];
> expr = Show[ToExpression["
> Graphics`Graphics`BarChart"][bardata = Table[Random[] - 0.5, {
> 13}], BarOrientation -> Horizontal]];
> SetPropertyValue[{"zplot", "
> mathCommand"}, ToString[expr, InputForm]]]
> ]
> }
> ]
> ]
>
> The problem is that the bars are display vertically, even though I
> specify BarOrientation -> Horizontal!
>
> Thanks for your help.
>
> Regards,
> Brett Patterson
>
Hi,
Once again, it would seem that the symbol BarOrientation is being moved
into a private context (I think this is a GUIKit bug), so the answer is
much the same - replace the symbol BarOrientation with
ToExpression["Graphics`Graphics`BarOrientation"]
or use my SWP!
David Bailey
dbaileyconsultancy.co.uk