Forum Academy Marketplace Showcase Pricing Features

Graphing Issue: Make no data equal zero

Hi everyone. I’m trying to create a simple graph (using the Bubble Chart Element plugin), but I’m pretty new to graphing and am hoping someone can help.

I’m a teacher, my graph tracks student marks per week. So if a student got 2 in week 1 then I’d like the week 1 column to have a height of 2. Easy enough so far, I’ve got that working.

The challenge I’m facing is I’d like for weeks where no data is found to be displayed as a zero on the graph. I don’t add marks of zero (it would be cumbersome to have to go through give zeros for every student who hasn’t earned a mark). But this means the graph just skips that week currently.

So if a student got the following marks:

Week 1: 3

Week 2: 2

Week 3: Absent (no mark)

Week 4: 4

I’d like a graph showing bars of height 3,2,0,4.
Graphing
Is there any way to achieve this?

My data structure is simple enough. I have a data type Student Marks with 3 fields: Student, Mark (the numerical value), and Week.

Additionally (but less important) I’d like the graph to always show 10 weeks (1 term), so for weeks yet to happen I’d like them to display as zero as well, until marks are earned.

Thanks

Barry

@BarryBlock

Is the graph receiving what it needs to display zero for week 3? … If not then it will not display it because it does no have to.

Hi @cmarchan, thanks so much for the reply.

No there is no data for week 3 (or any week where I want to give a zero), that’s the challenge I’m facing here. Those grades don’t exist. I’m hoping to somehow get it to display a zero when it doesn’t find a grade for a week. Is there any trick that can be done to achieve this? Any way of saying ‘display weeks 1 to 10, and if no data is found display zero’?

Thanks
Barry

Can you do this with timeseries data?

I do this with my chart plugin but it’s a line chart.

I always have null values since I don’t do daily data collection but want to display data in a timeline format.