Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Is possible to input a analog clock inside the qvw???

Someboby knows that??

My beautiful customer want that..........lolol

tks!

1 Solution

Accepted Solutions
johnw
Champion III
Champion III

Yep, it's possible. I won't be much help, though. Michael Solomovich posted an example last year. It was posted as a "try to figure out how I did this" exercise instead of an example you could use, and I never tried to figure it out. Ditto for someone else's analog clock that was linked to in the same thread. Here's the thread:

http://community.qlik.com/forums/p/17364/71169.aspx#71169

My guess would be some sort of clever use some gauge charts. Seems like an interesting challenge that probably isn't too complicated once you've worked out all the details. Or maybe searching will turn up someone who posted how to do it rather than a challenge exercise.

View solution in original post

8 Replies
johnw
Champion III
Champion III

Yep, it's possible. I won't be much help, though. Michael Solomovich posted an example last year. It was posted as a "try to figure out how I did this" exercise instead of an example you could use, and I never tried to figure it out. Ditto for someone else's analog clock that was linked to in the same thread. Here's the thread:

http://community.qlik.com/forums/p/17364/71169.aspx#71169

My guess would be some sort of clever use some gauge charts. Seems like an interesting challenge that probably isn't too complicated once you've worked out all the details. Or maybe searching will turn up someone who posted how to do it rather than a challenge exercise.

johnw
Champion III
Champion III

OK, I decided to give it a shot. It needs a little cleaning up, but here you go.

Edit: Hmmm, interesting. It isn't running now. It was running just fine when I saved it. Maybe this is the version 9 problem that people were referring to? Hmmm, not running in 8.5 either. I can make it update by right clicking on it, but it's not running any more. Not sure why. Anyone? Gah, now it's running in 8.5 again. Maybe I was looking at 9.0 when I thought I was looking at 8.5? I don't know, but I built it in 9.0, and it WAS running when I built it. Grrr.

Edit: I have a cleaned up version now. Still doesn't work in 9.0. And the forum isn't letting me upload right now. *grumble*

Not applicable
Author

John,

Really appreciate your solution and creativity.....

....on version 8.5 still working without problems.......

best regards !!!!

Tks a lot!!!

Not applicable
Author

Hi all,

I had to create a very similar analog clock some while ago. I had the same issue, the clock was not running after (re)opening the application. But, if you reload, the clock will start working again.

Hope my remark will help.

Kos.

Not applicable
Author

Which QV version did you use?

I use the 8.5 and still running without problems, i tested on the 9.0 and dont work!!!

Not applicable
Author

Now I'm using 9.0. Back when I created the application, I was using 8.5 and still it didn't start without a reload. Maybe it also depends on the build number.

To workaround this issue, I created a macro that was doing a silent reload every time the application was opened. Luckily, the reload was taking somewhere under 2 seconds and the automated refresh of data was actually useful 🙂

Not applicable
Author

My build number is 8.50.6326.5.

johnw
Champion III
Champion III

Fixed a bug in the hours, possibly some other bugs. Got the 12 up top. Cleaned it up a lot visually. Hour and minute hands now move slowly instead of staying on a specific number. Added a digital clock to it as well, though mostly so it's easy to see whether or not the analog clock is working. Hopefully no more bugs, though it wouldn't surpise me if I still have some. It's working for me in 8.50.6231.5, but not in 9.00.7436.8 SR3.

I still can't upload, so here are the expressions I'm using:

seconds: second(now())
minutes: frac(now()*24)*60
hours: frac(now())*24+12*(frac(now())>.5)

I also currently have four charts instead of three. One for each hand, and one for the dial. It was easier to format with the separate dial.

Edit: Heh. OK, I used Cosmin's macro reload trick to get it to work in version 9. Probably not practical for most real applications, but it works for the example. That's a pretty amusing workaround. And since it works, I'm going to guess that the chart not refreshing without the reload is a version 9 bug, and not some intentional change to save us from the perils of using now().

Edit: The clock seems to be using about 5% of my CPU on a very old machine. That's probably acceptable if the user really really wants an analog clock.