Click here to Skip to main content
15,897,291 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am working on the chart, with different period types like Day, Week, Month, and Year.

If we compare the Data for the Day period in the chart, we can compare today and yesterday.

If we compare the Data for the Week period in the chart, we can compare Present Week and Past Week i.e., Sun to Sat.

If we compare the Data for the Year period in the chart, we can compare Present Year and Past Year i.e., Jan to Dec.

My question is If we want to compare the Months, how can we compare the present month and past month data?

However, if we show in the charts we should assign the dates to the series name, then only it will show the dates in the X-Axis otherwise it may take the dates as different series and it shows each date as series names.

How can we show two different months' data in the charts side-by-side (Bar Charts)?

What I have tried:

C#
nothing tried yet.
Posted
Updated 8-Aug-22 7:04am
v2
Comments
OriginalGriff 8-Aug-22 6:05am    
This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind - we only get exactly what you type to work with - we get no other context for your project.
Imagine this: you go for a drive in the country, but you have a problem with the car. You call the garage, say "it broke" and turn off your phone. How long will you be waiting before the garage arrives with the right bits and tools to fix the car given they don't know what make or model it is, who you are, what happened when it all went wrong, or even where you are?

That's what you've done here. So stop typing as little as possible and try explaining things to people who have no way to access your project!

So we have no idea what you mean by "comparing data in a chart" or why it's giving you a problem.

Use the "Improve question" widget to edit your question and provide better information.
Bojjaiah 8-Aug-22 6:10am    
Thanks, @OriginalGriff, I just posted my thought. I Will update.

1 solution

A "bar" chart is not appropriate for what you want (when comparing 2 series); a line chart is.

But if all you're doing is comparing "2 numbers", then 2 bars (with one called "present" and the other as "previous" as "categories" on the x-axis), is all you need (the month x "value" doesn't come into it).

How Do I Choose Which Type of Graph to Use?-NCES Kids' Zone[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900