Here's a screen capture from a site where I can view /site-analytics
:
The orange "all posts" curve should be strictly larger than the blue "questions" curve, but they are mistakenly displaying the same data.
Meta Stack Exchange is a question and answer site for meta-discussion of the Stack Exchange family of Q&A websites. It only takes a minute to sign up.
Sign up to join this communityHere's a screen capture from a site where I can view /site-analytics
:
The orange "all posts" curve should be strictly larger than the blue "questions" curve, but they are mistakenly displaying the same data.
This is now fixed. The root cause was something like this:
AllPostsDatapoints.Add( questionDatapoint?.Value ?? 0 + answerDatapoint?.Value ?? 0 )
The intent here is to sum the question and answer counts for a given date, allowing for the possibility that either or both might be null (no questions or answers for that day). But... The null coalescing operator has lower precedence than the addition operator, so what the expression actually evaluates to is... The question count, unless there were no questions, in which case it evaluates to the answer count.
I'm not normally a big fan of junking up expressions with lots of parentheses, but in this case that's the only way it really works:
AllPostsDatapoints.Add( (questionDatapoint?.Value ?? 0) + (answerDatapoint?.Value ?? 0) )
Thanks for reporting this!
where PostType = "question"
in the wrong place.