We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

I want to show stacked bar in my app ? How can I do that?

Hi,
I need to show the stacked Bar in my app however when I'm using the Sfchart component I need to provide the primary and secondary axis which is fine but I dont want the numerical axis I want to show something else ? How can i do that ? 

5 Replies

SP Saravana Pandian Murugan Syncfusion Team May 10, 2016 11:32 AM UTC

Hi Utkarsh,

Please let us know what value you want to show in primary and secondary axis instead of number.

Thanks,
Saravana Pandian M.



UT Utkarsh May 11, 2016 06:56 AM UTC

Hi Saravana,

There are two cases involved in it :

Scenario 1:
I want to show the Stacked Bar same as attached image but want some modification like on the secondary axis I want person name and inside the bar I have to show the percentage however on the primary axis I just want to provide the title nothing else. Also can we customize the bar color ?

Second Case:
I want to display person name on the primary axis and secondary axis needs to numerical ?

It'll be really helpful if you guide me through both the cases.


Thanks,
Utkarsh Srivastava

Attachment: Stacked_Bar_c1e291fa.zip


SP Saravana Pandian Murugan Syncfusion Team May 12, 2016 07:29 AM UTC

Hi Utkarsh,

#1) We have prepared a sample based on your requirement. We can customize the bar color using Color property of ChartSeries.

Sample: http://www.syncfusion.com/downloads/support/forum/124013/ze/StackedBarSample1199460031  

#2) We can achieve this requirement by setting CategoryAxis to PrimaryAxis and NumericalAxis to SecondaryAxis property of SfChart.

Thanks,
Saravana Pandian M. 



UT Utkarsh May 18, 2016 05:33 AM UTC

Hi Saravana,

Thank you for your quick sample . Can you please provide the example for second use case as well ? I'll be highly thankful to you.

Thanks,
Utkarsh Srivastava


SP Saravana Pandian Murugan Syncfusion Team May 19, 2016 06:12 AM UTC

Hi Utkarsh,

Thanks for your update. We have prepared a sample as per your second case which can be downloaded from the following location.

Sample: http://www.syncfusion.com/downloads/support/forum/124013/ze/LineSeriesSample-1443659900  

Thanks,
Saravana Pandian M.
 


Loader.
Up arrow icon