FusionCharts Forum: Different precisions for multi-series data sets - FusionCharts Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Different precisions for multi-series data sets possible?

#1 User is offline   camupod 

  • Forum Newbie
  • Group: Members
  • Posts: 4
  • Joined: 01-December 09

Posted 01 December 2009 - 04:44 PM

Hello,



I want to have different decimal precisions for each dataset in my multi-set line graph. Is this possible? I am imagining something like :




<dataset seriesName="A" decimalPrecision="2">

...

</dataset>

<dataset seriesName="B" decimalPrecision="0">

...

</dataset>



and also I'd like to specify the precision for the y axis separately, like:


<graph caption="Graph" yAxisDecimalPrecision="0">



Thanks!

Cameron
0

Other Replies To This Topic

#2 User is offline   Madhumita 

  • Supreme Being
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1434
  • Joined: 04-September 09

Posted 01 December 2009 - 11:22 PM

Hello,

Welcome to FusionCharts Forum. :)

I'm afraid, this functionality is not available for FusionCharts.

However, there is an alternative for FusionCharts v3. You can choose to use the displayValue attribute in each <set> element to display the number in the format you require. 
FusionCharts Free does not have this functionality.

Regards,
Madhumita Chakraborty

Follow us on Twitter :)
0

Other Replies To This Topic

#3 User is offline   camupod 

  • Forum Newbie
  • Group: Members
  • Posts: 4
  • Joined: 01-December 09

Posted 02 December 2009 - 08:10 AM

It's alright... I ended up changing the code in the .fla to support dataset-specific decimalPrecision... only 3 lines changed! :)
0

Other Replies To This Topic

#4 User is offline   Madhumita 

  • Supreme Being
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1434
  • Joined: 04-September 09

Posted 02 December 2009 - 08:31 AM

Hello,

That is great!

Could you please share your ideas here if possible ?


Regards,
Madhumita Chakraborty

Follow us on Twitter :)
0

Other Replies To This Topic

#5 User is offline   camupod 

  • Forum Newbie
  • Group: Members
  • Posts: 4
  • Joined: 01-December 09

Posted 02 December 2009 - 09:13 AM

The chart I changed was the MSLine (MSLine.fla), but I'm assuming the change would be similar in most of them.



in MSLine.fla on the Chart Class layer's actionscript I added a line to the parameter parsing function (line 303)







This adds a parameter to the dataset for decimalPrecision (and defaults to the main graph decimalPrecision):



this.dataset[this.Params.numDs].decimalPrecision = Number(getFirstValue(levelTwoNodes[j].attributes.decimalPrecision, this.Params.decimalPrecision));







Then later on in the same script in function Chart.prototype.drawValueTb:







changed this line:



createText(this.getLevel(), this.formatNumber(this.dataSet[i].data[j].value), this.dataSet[i].data[j].valueTbX, this.dataSet[i].data[j].valueTbY, this.Params.baseFont, this.Params.baseFontSize, this.Params.baseFontColor, false, "center", "left", null, true);



to this:



createText(this.getLevel(), this.formatNumber(this.dataSet[i].data[j].value , this.dataSet[i].decimalPrecision ), this.dataSet[i].data[j].valueTbX, this.dataSet[i].data[j].valueTbY, this.Params.baseFont, this.Params.baseFontSize, this.Params.baseFontColor, false, "center", "left", null, true);







and likewise, this:



createText(this.getLevel(), this.formatNumber(this.dataSet[i].data[j].value), this.dataSet[i].data[j].valueTbX, this.dataSet[i].data[j].valueTbY, this.Params.baseFont, this.Params.baseFontSize, this.Params.baseFontColor, false, "center", "right", null, true);



to this:



createText(this.getLevel(), this.formatNumber(this.dataSet[i].data[j].value , this.dataSet[i].decimalPrecision ), this.dataSet[i].data[j].valueTbX, this.dataSet[i].data[j].valueTbY, this.Params.baseFont, this.Params.baseFontSize, this.Params.baseFontColor, false, "center", "right", null, true);
0

Other Replies To This Topic

#6 User is offline   Rajroop 

  • FusionCharts Team
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1803
  • Joined: 19-May 09

Posted 09 December 2009 - 09:03 AM

Great going! :)
Regards,

Rajroop Bhaduri

FusionCharts Team

Help us improve our documentation with your precious feedback at:
http://documentation...sioncharts.com/

Follow us @Twitter
0

Other Replies To This Topic

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic