Ravikumar Sutagundi

Display date(2013/07/20) data in x/y axis in bar and columns charts

Recommended Posts

Hi,

Can we display dates data in bar and column charts. I tried but it always shows in thousands. 2013 will be shown as 2k.

Is there way to achieve this?

Appreciate the response.

 

Regards,

rAvi

Edited by Ravikumar Sutagundi

Share this post


Link to post
Share on other sites

Hi Ravi,

 

The Bar and Column chart types render chart with values mapped to the respective category labels. The values does not represent dates data in bar and column charts.

However, the value 2013 will be displayed as 2K, due to the default number scale formatting feature of FusionCharts. You can disable it to display 2013 as simply 2013 with out scaling and formatting by setting "formatNumber" and "formatNumberScale" to "0".

Refer to this sample fiddle : http://jsfiddle.net/gudts7cw/4/

 

Thanks,

Akash.

Share this post


Link to post
Share on other sites
On 3/28/2019 at 7:53 PM, Akash Biswas said:

Hi Ravi,

 

The Bar and Column chart types render chart with values mapped to the respective category labels. The values does not represent dates data in bar and column charts.

However, the value 2013 will be displayed as 2K, due to the default number scale formatting feature of FusionCharts. You can disable it to display 2013 as simply 2013 with out scaling and formatting by setting "formatNumber" and "formatNumberScale" to "0".

Refer to this sample fiddle : http://jsfiddle.net/gudts7cw/4/

 

Thanks,

Akash.

Hello Akash,

 

Thanks for the reply. I did try this, however I can see only year displayed not the date and month. 2019-01-04 is being displayed as only 2019.

Any other ways to display full date? Appreciate the response.

Regards,

Ravi

Share this post


Link to post
Share on other sites

Hi Ravi,

 

The horizontal axis in a Bar chart is a numeric axis and it does not support the date and month representation. The numeric value set using the "value" attribute of the "data" objects are plotted with respect to the y-axis scale on the chart.

As a work-around, if you want to display the date and month on the plots, you can set your custom string in the "displayValue" attribute within the data objects, which will be displayed on the plots instead of the actual values.

Please note : The "value" attribute accepts numeric values only.

Please check the sample fiddle for reference : https://jsfiddle.net/17ucrpdx/3/

 

Thanks,

Akash.

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