Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLockGuage[] does not work #326

Open
JerryI opened this issue Jan 3, 2025 Discussed in #325 · 1 comment
Open

CLockGuage[] does not work #326

JerryI opened this issue Jan 3, 2025 Discussed in #325 · 1 comment
Labels
bug Something isn't working

Comments

@JerryI
Copy link
Owner

JerryI commented Jan 3, 2025

Discussed in #325

Originally posted by amindanial January 2, 2025
While I was trying some commands on WLJS notebook with Wolfram Engine 14.1, I found that ClockGuage[] does not work properly as shown in the following figure:
Screenshot 2025-01-03 000925

@JerryI JerryI added the bug Something isn't working label Jan 3, 2025
@JerryI
Copy link
Owner Author

JerryI commented Jan 4, 2025

We managed to make it work till this state

Screenshot 2025-01-04 at 19 51 53

However, for some reason it uses multiple nested Graphics for arrow (oh God! Why not just draw them directly using polygon), on which geometric transformations are applied. It is a mess. It might be better to rewrite its definition

I checked DownValue

{HoldPattern[(ClockGauge[System`GaugesDump`a:PatternSequence[Except[_Dynamic|_?OptionQ],Except[_?OptionQ]...]|PatternSequence[],System`GaugesDump`o:OptionsPattern[]])?(Function[{System`GaugesDump`arg},Charting`ClockCheck[System`GaugesDump`arg,Charting`iDialGauge],HoldFirst])]:>With[{System`GaugesDump`res=Catch[Charting`iDialGauge["ClockGauge",System`GaugesDump`a,System`GaugesDump`o],"GaugeError",$Failed]},System`GaugesDump`res/;Head[Unevaluated[System`GaugesDump`res]]=!=$Failed],HoldPattern[(ClockGauge[System`GaugesDump`a:PatternSequence[_Dynamic[__],Except[_?OptionQ]...],System`GaugesDump`o:OptionsPattern[]])?(Function[{System`GaugesDump`arg},Charting`ClockCheck[System`GaugesDump`arg,Charting`iDialGauge],HoldFirst])]:>With[{System`GaugesDump`r=Catch[ReleaseHold[Charting`gaugeBoxes[2,"ClockGauge",StandardForm,System`GaugesDump`a,System`GaugesDump`o]],"GaugeError",$Failed]},If[Head[Unevaluated[System`GaugesDump`r]]=!=$Failed,Charting`makeGaugeBoxes[2,"ClockGauge",StandardForm,System`GaugesDump`a,System`GaugesDump`o],$Aborted]],HoldPattern[Charting`makeGaugeBoxes[2, ClockGauge, StandardForm, Dynamic[], System`GaugesDump`o:OptionsPattern[]]?(Function[{System`GaugesDump`arg},Charting`ClockCheck[System`GaugesDump`arg,Charting`iDialGauge],HoldFirst])]:>Module[{DynamicDump`time=DynamicBox[ToBoxes[Refresh[Floor[DateList[][[4 ;; 6]]], UpdateInterval -> 1], StandardForm]]},With[{System`GaugesDump`r=Catch[ReleaseHold[Charting`gaugeBoxes[2,"ClockGauge",StandardForm,DynamicDump`time,System`GaugesDump`o,Enabled->False]],"GaugeError",$Failed]},If[Head[Unevaluated[System`GaugesDump`r]]=!=$Failed,Charting`makeGaugeBoxes[2,"ClockGauge",StandardForm,DynamicDump`time,System`GaugesDump`o,Enabled->False],$Aborted]]]}

However, the rest is hidden

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant