Apurva

Change X-Axis field in Bar/Line chart

Recommended Posts

Hi,

I have a bar chart where X-axis shows 'Month' and Y-axis has 'Sales' now I need to change the x-axis from 'Month' to 'Quarter'. So that I'll have a single measure (Sales) and can have multiple Dimension Fields (Month or Quarter).

Is there a way of switching between x-axis fields or dimension?

Thanks

Apurva

Share this post


Link to post
Share on other sites

Hi Apurva,

 

As per our understanding, you want to have a time-series representation of the x-axis, where you can explore the data with atomicity on the x-axis. This feature is supported in the FusionTime product which works exclusively with time series data.

Documentation link : https://www.fusioncharts.com/dev/fusiontime/getting-started/how-fusion-time-works

Sample showcased : https://www.fusioncharts.com/fusiontime/examples

 

Bar chart of FusionCharts does not support this feature.

 

Thanks,

Akash.

Share this post


Link to post
Share on other sites

Hi Akash,

 

You misunderstood the requirement. I need to know a feature where we can change the dimension.

For example I want to show Sales by Products and Sales by Month, So instead of creating 2 Bar charts, i want to create a single chart with interchangeable x-axis dimension (switch between Products and Month). 

Its like the same functionality we have for Fusion Themes where we can click radio button and switch to a different theme.

Thanks

Apurva

 

Share this post


Link to post
Share on other sites

Hi Apurva,

 

Interchangeable x-axis is not supported in a single chart.

However, as per your explanation of the requirement, you can render to different dataSource on the same chart using setJSONData() API method. This method could be invoked on the radio button click event function.

Please refer to this sample using the above technique to set the chart data with respect to Months and Products :

https://codepen.io/Akash008/pen/JjoeQOz?editors=0110

 

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