Sign in to follow this  
Bhaskar

Remove Decimals For Min And Max Values Of A Bar2D Chart

Recommended Posts

Hi,

I wana remove decimals for min and max values of a Bar2d fusion ChartV3, anyone help me on this.

 

thanks

Bhaskar

post-21179-0-84081000-1317288761_thumb.png

Edited by Bhaskar

Share this post


Link to post
Share on other sites
Guest Angshu

Hi,

 

Thanks for your post.

 

Could you please send us the XML code to test it from our end?

 

Awaiting for your response.

Share this post


Link to post
Share on other sites

Hi,

thanks for your quick reply. please find the below xml.

<chart decimals='1' forceDecimals='1' yAxisValueDecimals ='1' showToolTip='0' bgColor='FFFFFF' canvasBorderColor='000000' canvasBorderThickness='1' plotGradientColor='FFFFFF' showBorder='0' numDivLines='1' numberPrefix='$' showValues='0' plotSpacePercent='60' showLabels='0' >

<set value='2.4' label='$2.4' color='79953F '/>

<vLine color='000000' thickness='1' dashed='1'/>

<set value='1.2' label='$$1.2' color='79953F'/>

<set value='0.7' label='$$0.7' color='79953F'/>

<set value='0.3' label='$$0.3' color='79953F'/>

<set value='0.3' label='$$0.3' color='79953F'/>

</chart>

thanks & regards

Bhaskar

Share this post


Link to post
Share on other sites
Guest Angshu

Hi,

 

Thanks for your response.

 

Please find the modified code below:

 

<chart decimals='0' forceDecimals='0' yAxisValueDecimals ='1' showToolTip='0' formatNumber='0' bgColor='FFFFFF' canvasBorderColor='000000' canvasBorderThickness='1' plotGradientColor='FFFFFF' showBorder='0' numDivLines='1' numberPrefix=' showValues='0' plotSpacePercent='60' showLabels='1' >
<set value='2.4' label='$2.4' color='79953F '/>
<vLine color='000000' thickness='1' dashed='1'/>
<set value='1.2' label='$1.2' color='79953F'/>
<set value='0.7' label='$0.7' color='79953F'/>
<set value='0.3' label='$0.3' color='79953F'/>
<set value='0.3' label='$0.3' color='79953F'/>
</chart>

 

Please find the screenshot attached for your reference.

 

Hope this helps.

post-10517-0-64540900-1317289540_thumb.png

Share this post


Link to post
Share on other sites

Hi,

Thanks for your response.

 

Sorry for confusion, I want decimals for all except min and max values. My x-axis may have 0.2, 0.4 like values.

 

Thanks & regards

Bhaskar

post-21179-0-15402800-1317290212_thumb.png

Share this post


Link to post
Share on other sites
Guest Angshu

Hi,

 

Please find the modified code below:

 

<chart decimals='1' forceDecimals='1' yAxisValueDecimals ='1' showToolTip='0' formatNumber='0' bgColor='FFFFFF' canvasBorderColor='000000' canvasBorderThickness='1' plotGradientColor='FFFFFF' showBorder='0' numDivLines='1' numberPrefix='$' showValues='0' plotSpacePercent='60' showLabels='1'>
<set value='2.4' label='$2.4' color='79953F '/>
<vLine color='000000' thickness='1' dashed='1'/>
<set value='1.2' label='$$1.2' color='79953F'/>
<set value='0.7' label='$$0.7' color='79953F'/>
<set value='0.3' label='$$0.3' color='79953F'/>
<set value='0.3' label='$$0.3' color='79953F'/>
</chart>

 

 

Hope this helps.

Share this post


Link to post
Share on other sites
Guest Angshu

Hi,

 

Could you please confirm the FusionCharts version you are using?

 

Awaiting for your response.

Share this post


Link to post
Share on other sites

/*!

* FusionCharts JavaScript Library

* Copyright FusionCharts Technologies LLP

* @license License Information at <http://www.fusioncharts.com/license>

*

* @author FusionCharts

* @version 3.2.1-release

*

* Third-party attributions:

* SWFObject v2.2 <http://code.google.com/p/swfobject/>

* JSON v2 <http://www.JSON.org/js.html>

* Firebug Lite 1.3.0 <http://getfirebug.com/firebuglite>

* jQuery 1.4.2 <http://jquery.com/>

*/

Share this post


Link to post
Share on other sites
Guest Angshu

Hi,

 

I am afraid, we are unable to replicate the issue, as the code is working fine for JS chart also.

 

Please find the screenshot attached for your reference.(right one is the JS chart)

post-10517-0-43698100-1317295534_thumb.png

Share this post


Link to post
Share on other sites

Hi,

 

Can you please try this in 3.2.1

<chart formatNumber='0' decimals='1' forceDecimals='1' yAxisValueDecimals ='1' showToolTip='0' bgColor='FFFFFF' canvasBorderColor='000000' canvasBorderThickness='1' plotGradientColor='FFFFFF' showBorder='0' numDivLines='1' numberPrefix='$' showValues='0' plotSpacePercent='60' showLabels='0' >

<set value='7308.4' label='$7308.4' color='79953F '/>

<vLine color='000000' thickness='1' dashed='1'/>

<set value='5444.1' label='$$5,444.1' color='79953F'/>

<set value='1864.3' label='$$1,864.3' color='79953F'/>

</chart>

 

thanks & regards

Bhaskar

Share this post


Link to post
Share on other sites

Hi,

 

Can you please try this in 3.2.1

<chart formatNumber='0' decimals='1' forceDecimals='1' yAxisValueDecimals ='1' showToolTip='0' bgColor='FFFFFF' canvasBorderColor='000000' canvasBorderThickness='1' plotGradientColor='FFFFFF' showBorder='0' numDivLines='1' numberPrefix='$' showValues='0' plotSpacePercent='60' showLabels='0' >

<set value='7308.4' label='$7308.4' color='79953F '/>

<vLine color='000000' thickness='1' dashed='1'/>

<set value='5444.1' label='$$5,444.1' color='79953F'/>

<set value='1864.3' label='$$1,864.3' color='79953F'/>

</chart>

 

thanks & regards

Bhaskar

Share this post


Link to post
Share on other sites
Guest Angshu

Hi,

 

Please try the same by setting <forceYAxisValueDecimals='0'> attribute inside the <chart> element.

 

Hope this helps.

Share this post


Link to post
Share on other sites

Hi,

I am getting the below error on javascript renderer mode.

#25081850 TEST::RendererManager Error >> There was an error rendering the chart. Enable FusionCharts JS debugMode for more information.FusionCharts.js? (line 15)

This is coming in FF 7 - console.

thanks & regards

Bhaskar

Edited by Bhaskar

Share this post


Link to post
Share on other sites
Guest Angshu

Hi,

 

Could you please send us the HTML code to look into the issue?

 

Awaiting for your response.

Share this post


Link to post
Share on other sites

Hi

In JSP...

I created a HTML DIV with id 'wealth-chart' .

<script type="text/javascript" src="../js-lib/FusionCharts/FusionCharts.js?<%=Property.RELEASE.getValue()%>"></script>

 

if(Util.hasFlash()) {

FusionCharts.setCurrentRenderer('flash');

if($j.browser.msie && ($j.browser.version > 8 || document.documentMode > 8)) {

var chartHeight = numOfBars * 23 + 77;

}

var myChart = new FusionCharts(Constants.COMMON.ROOT + "js-lib/FusionCharts/swf/Bar2D.swf ", "wealthChart", "195", chartHeight, "0", "0");

 

}

else {

var chartHeight = numOfBars * 23 + 60;

$j('#secondChart').css("margin-top","20px");

if($j.browser.msie && ($j.browser.version > 8 || document.documentMode > 8)) {

var chartHeight = numOfBars * 23 + 53;

}

FusionCharts.setCurrentRenderer('javascript');

var myChart = new FusionCharts(Constants.COMMON.ROOT + "js-lib/FusionCharts/swf/Bar2D.swf ", "wealthChart", "230", chartHeight, "0", "0");

 

}

myChart.setDataXML(dataXML.join(""));

 

myChart.render("wealth-chart");

---- ---- --------------------------------------------------

dataXML.push("<chart decimals='1' forceYAxisValueDecimals='0' forceDecimals='1' showToolTip='0' formatNumber='0' bgColor='FFFFFF' canvasBorderColor='000000' canvasBorderThickness='1' plotGradientColor='FFFFFF' showBorder='0' numDivLines='0' numberPrefix=' showValues='0' plotSpacePercent='60' showLabels='0'>");

dataXML.push("<vLine color='000000' thickness='1' dashed='1'/>");

dataXML.push ("<set value=\'" + compTotal + "\' " + "label=\'{:content:}quot; + compTotal + "\' " + "color=\'79953F \'" + "/>");

Edited by Bhaskar

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this