MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Using BarChart in a Widget


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


  • Prev by Date: Re: Clearing the definitions saved by using the "Save" command
  • Next by Date: Re: something like dB
  • Previous by thread: Re: Using BarChart in a Widget
  • Next by thread: Mathlink memory preservation