Using Contenttype in charts



I want to be able to group by ContentType for my statistics in the charts.

I’ve seen this: Content type column not displaying

But the answer is only getting the ContentType Id, so this is only part of my problem.

I’ve tried to in CAML-query:


But when I try to
handlers.init = function (data, logger, processor, el, model) {
return true;

The Group by “ContentType” I get nothing in my chart

I group by ContentType and count by ID

Please help.


Hi Frikk,

You can retrieve the Content Type ID and then use it for grouping:

Add the reference into the CAML-query:

<View> <ViewFields> <FieldRef Name="ContentTypeId"/> </ViewFields> ... </View>

And add it to the model in the Advanced tab:

[code]handlers.init = function (data, logger, processor, el, model) {

logger.debug('Data is initialized: ', data);
return true;

Here you go: