Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Putting the time of day at "x" axis
Julio Amorim
<p><span><span>Hello everybody,</span> <span>my problem is</span><span>:</span> <span>I'm doing</span> <span>a chart and</span> <span>have</span> <span>it</span> <span>to put</span> <span>the time of day</span> <span>in</span> <span>any</span> <span>axis</span><span>, so there is</span> <span>a comparison</span> <span>that</span> <span>the</span> <span>rest of the</span> <span>result of the</span> database(mysql) <span>that I will receive</span><span>.</span> <span>The problem is</span> <span>that I am not</span> <span><span>getting</span></span> <span>put this</span> <span>hour, not</span> <span>by the</span> <span>'</span><span>data set</span><span>'</span> <span>or</span> <span>in any other way</span><span>.</span> <span>Can you help me?</span> <span>I will be very</span> <span>grateful</span><span>!</span><br><br><span>I'll put</span> <span>a picture</span> <span>below</span><span>,</span> <span>more or less</span> <span>what I want</span><span>.</span> <span>How is</span> <span>the image</span> <span>0-24</span> <span>in hours</span><span>.</span> <span>Thank you all</span><span>.</span></span></p>
Find more posts tagged with
Comments
pricher
<p>Hi Julio,</p>
<p> </p>
<p>You probably just need to create a Computed Column in your data set that will retrieve the hour component of the datetime field stored in the database. To do this:</p>
<p> </p>
<p>1. In your data set, go to Computed Columns;</p>
<p>2. Add a new column, data type Integer;</p>
<p>3. In Expression, use the following syntax: row["<YourDateTimeField>"].getHours() where <YourDateTimeField> is the name of the database column containing the datetime value.</p>
<p> </p>
<p>You can then use the computed column as the X-Axis in your chart.</p>
<p> </p>
<p>Hope this helps,</p>
<p> </p>
<p>P.</p>
Julio Amorim
<p><span><span>Hello</span> <span>Junior,</span><br><span>I am very</span> <span>grateful for the</span> <span>answer.</span> <span>Helped me a lot</span><span>!</span></span></p>