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)
More Values
net boy
Hello,
The following screenshot shows a birt chart with large number of values to plot, starting from 00:00:00 on the X-Axis. As there are lot of values on the X-Axis, the value 00:00:00 is not displayed as the first value on the X-Axis. Instead it displays 00:00:21. Is it possible to change the default behavior so that the start value is always 00:00:00, even if there are large number of values on the X-Axis?
Thanks,
Find more posts tagged with
Comments
JasonW
You can set the scale for the x or y axis in the chart wizard. If you do this an auto scale will not be used. To do this on the x-axis for date time do something like:
xAxisPrimary.getScale( ).setMin( DateTimeDataElementImpl.create( new CDateTime(2008,9,29,13,40) ) );
xAxisPrimary.getScale( ).setMax( DateTimeDataElementImpl.create( new CDateTime(2008,9,29,16,20) ) );
xAxisPrimary.getScale( ).setStep( 60 );
Jason
net boy
But the time values that I'm displaying on the X-Axis are Text Literals. I tried to use the Date time values when I started writing the code, but the chart was not drawing when I used it. So I have converted all the time values to String format and displayed it as Text on the X-Axis.<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>xAxis.setType(AxisType.TEXT_LITERAL);</pre>
<br />
So I think the statement you have suggested may not work. I have tried to convert the code you have sent. But there is no TextDataElementImpl. So can you please suggest based on the Text Literals?<br />
<br />
Btw, sorry for the wrong information.<br />
<br />
Thanks.
JasonW
If this is a text data set you you are going to have to add the values manually. The chart engine will not know how to scale a text based axis. How are you getting the data for the chart currently?
Jason
net boy
Jason,<br />
<br />
I have attached a portion of the code where I'm doing it
net boy
<blockquote class='ipsBlockquote' data-author="'JasonW'" data-cid="85677" data-time="1322067678" data-date="23 November 2011 - 10:01 AM"><p>
If this is a text data set you you are going to have to add the values manually. The chart engine will not know how to scale a text based axis. How are you getting the data for the chart currently?<br />
<br />
Jason<br /></p></blockquote>
<br />
Jason,<br />
<br />
Could you please respond to my reply?<br />
<br />
Thanks,<br />
netboy
JasonW
Sorry I have been on vacation. I am cerain on a solution for you. The x-axis values if they are text based do not use an auto-scale. It just uses a tick for every data point.
Jason