diff --git a/cli/src/commands/migrateVizTypesOfTemplates.js b/cli/src/commands/migrateVizTypesOfTemplates.js index 8682fe6346..0de477f13a 100644 --- a/cli/src/commands/migrateVizTypesOfTemplates.js +++ b/cli/src/commands/migrateVizTypesOfTemplates.js @@ -12,6 +12,7 @@ import { TEMPLATE_MOST_POPULAR_ACTIVITIES, TEMPLATE_MOST_POPULAR_VERBS, TEMPLATE_WEEKDAYS_ACTIVITY, + TEMPLATE_LEARNING_EXPERIENCE_TYPE, } from 'lib/constants/visualise'; // Define visualisation model @@ -58,6 +59,9 @@ export const removeTemplateIdAndTemplateStage = async () => { case '6': visualisation.type = TEMPLATE_WEEKDAYS_ACTIVITY; break; + case '7': + visualisation.type = TEMPLATE_LEARNING_EXPERIENCE_TYPE; + break; default: throw new Error(`templateId ${visualisation.templateId} is invalid`); } @@ -112,6 +116,11 @@ export const addTemplateIdAndTemplateStage = async () => { visualisation.templateId = '6'; visualisation.templateStage = 'completed'; break; + case TEMPLATE_LEARNING_EXPERIENCE_TYPE: + visualisation.type = LEADERBOARD; + visualisation.templateId = '7'; + visualisation.templateStage = 'completed'; + break; default: visualisation.templateId = undefined; visualisation.templateStage = undefined; diff --git a/lib/constants/visualise.js b/lib/constants/visualise.js index 656595f610..001ef21050 100644 --- a/lib/constants/visualise.js +++ b/lib/constants/visualise.js @@ -22,3 +22,4 @@ export const TEMPLATE_CURATR_LEARNER_INTERACTIONS_BY_DATE_AND_VERB = 'TEMPLATE_C export const TEMPLATE_CURATR_USER_ENGAGEMENT_LEADERBOARD = 'TEMPLATE_CURATR_USER_ENGAGEMENT_LEADERBOARD'; export const TEMPLATE_CURATR_PROPORTION_OF_SOCIAL_INTERACTIONS = 'TEMPLATE_CURATR_PROPORTION_OF_SOCIAL_INTERACTIONS'; export const TEMPLATE_CURATR_ACTIVITIES_WITH_MOST_COMMENTS = 'TEMPLATE_CURATR_ACTIVITIES_WITH_MOST_COMMENTS'; +export const TEMPLATE_LEARNING_EXPERIENCE_TYPE = 'TEMPLATE_LEARNING_EXPERIENCE_TYPE'; diff --git a/ui/src/components/VisualiseIcon/index.js b/ui/src/components/VisualiseIcon/index.js index 3a5809a906..4b1e39e450 100644 --- a/ui/src/components/VisualiseIcon/index.js +++ b/ui/src/components/VisualiseIcon/index.js @@ -22,6 +22,7 @@ import { TEMPLATE_CURATR_USER_ENGAGEMENT_LEADERBOARD, TEMPLATE_CURATR_PROPORTION_OF_SOCIAL_INTERACTIONS, TEMPLATE_CURATR_ACTIVITIES_WITH_MOST_COMMENTS, + TEMPLATE_LEARNING_EXPERIENCE_TYPE, } from 'lib/constants/visualise'; import { LEADERBOARD_GREY_IMAGE, @@ -86,6 +87,8 @@ const getImageSrc = (type, sourceView) => { case TEMPLATE_CURATR_USER_ENGAGEMENT_LEADERBOARD: case TEMPLATE_CURATR_ACTIVITIES_WITH_MOST_COMMENTS: return LEADERBOARD_GREY_IMAGE; + case TEMPLATE_LEARNING_EXPERIENCE_TYPE: + return LEADERBOARD_GREY_IMAGE; case XVSY: return XVSY_IMAGE; case TEMPLATE_CURATR_INTERACTIONS_VS_ENGAGEMENT: diff --git a/ui/src/containers/Visualisations/TemplateLearningExperienceType/Card.js b/ui/src/containers/Visualisations/TemplateLearningExperienceType/Card.js new file mode 100644 index 0000000000..ab49e1010a --- /dev/null +++ b/ui/src/containers/Visualisations/TemplateLearningExperienceType/Card.js @@ -0,0 +1,27 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import { Map } from 'immutable'; +import TemplateCard from '../components/TemplateCard'; +import buildModel from './buildModel'; +import { title, image } from './constants'; + +/** + * @param {immutable.Map} props.model + * @param {() => void} props.saveModel + */ +const Card = ({ + model, + saveModel, +}) => ( + saveModel({ attrs: buildModel(model) })} /> + ); + +Card.propTypes = { + model: PropTypes.instanceOf(Map).isRequired, + saveModel: PropTypes.func.isRequired, +}; + +export default React.memo(Card); diff --git a/ui/src/containers/Visualisations/TemplateLearningExperienceType/Editor.js b/ui/src/containers/Visualisations/TemplateLearningExperienceType/Editor.js new file mode 100644 index 0000000000..0d6080cf92 --- /dev/null +++ b/ui/src/containers/Visualisations/TemplateLearningExperienceType/Editor.js @@ -0,0 +1,74 @@ +import React, { useCallback } from 'react'; +import PropTypes from 'prop-types'; +import { Map } from 'immutable'; +import DescriptionForm from '../components/DescriptionForm'; +import PreviewPeriodPicker from '../components/PreviewPeriodPicker'; +import Viewer from './Viewer'; + +/** + * @param {immutable.Map} props.model - visualisation model + * @param {string} props.orgTimezone + * @param {(args: object) => void} props.updateModel + * @param {(args: object) => void} props.setInMetadata + */ +const Editor = ({ + model, + updateModel, +}) => { + const id = model.get('_id'); + + console.log(model.get('sourceView')); + + const onChangeDescription = useCallback((description) => { + updateModel({ + schema: 'visualisation', + id, + path: 'description', + value: description, + }); + }, [id]); + + const onChangePreviewPeriod = useCallback((previewPeriod) => { + updateModel({ + schema: 'visualisation', + id, + path: 'previewPeriod', + value: previewPeriod, + }); + }, [id]); + + return ( +
+
+
+ +
+
+ +
+
+ +
+ +
+ +
+
+
+ ); +}; + +Editor.propTypes = { + model: PropTypes.instanceOf(Map).isRequired, + updateModel: PropTypes.func.isRequired, +}; + +export default Editor; diff --git a/ui/src/containers/Visualisations/TemplateLearningExperienceType/Viewer.js b/ui/src/containers/Visualisations/TemplateLearningExperienceType/Viewer.js new file mode 100644 index 0000000000..4c7a2166b9 --- /dev/null +++ b/ui/src/containers/Visualisations/TemplateLearningExperienceType/Viewer.js @@ -0,0 +1,25 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import SourceResults from 'ui/containers/VisualiseResults/SourceResults'; +import BarChartResults from 'ui/containers/VisualiseResults/BarChartResults'; + +/** + * @param {string} props.visualisationId + * @param {boolean} props.showSourceView + */ +const Viewer = ({ + visualisationId, + showSourceView, +}) => { + if (showSourceView) { + return ; + } + return ; +}; + +Viewer.propTypes = { + visualisationId: PropTypes.string.isRequired, + showSourceView: PropTypes.bool.isRequired, +}; + +export default React.memo(Viewer); diff --git a/ui/src/containers/Visualisations/TemplateLearningExperienceType/buildModel.js b/ui/src/containers/Visualisations/TemplateLearningExperienceType/buildModel.js new file mode 100644 index 0000000000..8ccfdd4e8c --- /dev/null +++ b/ui/src/containers/Visualisations/TemplateLearningExperienceType/buildModel.js @@ -0,0 +1,21 @@ +import { Map } from 'immutable'; +import { TEMPLATE_LEARNING_EXPERIENCE_TYPE } from 'lib/constants/visualise'; +import { LAST_7_DAYS } from 'ui/utils/constants'; +import { description } from './constants'; + +/** + * @param {immutable.Map} model + * @returns {immutable.Map} + */ +const buildModel = model => + model + .set('type', TEMPLATE_LEARNING_EXPERIENCE_TYPE) + .set('description', description) + .set('axesgroup', new Map({ optionKey: 'statement.context.contextActivities.grouping', searchString: 'statement.context.contextActivities.grouping' })) + .set('axesoperator', 'uniqueCount') + .set('axesvalue', new Map({ optionKey: 'statements', searchString: 'Statements' })) + .set('axesxLabel', 'Statements') + .set('axesyLabel', 'Learning Experience Types') + .set('previewPeriod', LAST_7_DAYS); + +export default buildModel; diff --git a/ui/src/containers/Visualisations/TemplateLearningExperienceType/constants.js b/ui/src/containers/Visualisations/TemplateLearningExperienceType/constants.js new file mode 100644 index 0000000000..28d8594059 --- /dev/null +++ b/ui/src/containers/Visualisations/TemplateLearningExperienceType/constants.js @@ -0,0 +1,5 @@ +import { LEADERBOARD_GREY_IMAGE } from 'ui/components/VisualiseIcon/assets'; + +export const title = 'What are the most popular learning experience activity types?'; +export const description = 'What are the most popular learning experience activity types?'; +export const image = LEADERBOARD_GREY_IMAGE; diff --git a/ui/src/containers/Visualisations/TemplateLearningExperienceType/index.js b/ui/src/containers/Visualisations/TemplateLearningExperienceType/index.js new file mode 100644 index 0000000000..34e53d625b --- /dev/null +++ b/ui/src/containers/Visualisations/TemplateLearningExperienceType/index.js @@ -0,0 +1,25 @@ +import { compose } from 'recompose'; +import PropTypes from 'prop-types'; +import { Map } from 'immutable'; +import { connect } from 'react-redux'; +import { updateModel } from 'ui/redux/modules/models'; +import { setInMetadata } from 'ui/redux/modules/metadata'; +import Editor from './Editor'; + +/** + * @param {immutable.Map} props.model - visualisation model + * @param {string} props.orgTimezone + */ +const TemplateLearningExperienceType = compose( + connect( + () => ({}), + { updateModel, setInMetadata }, + ), +)(Editor); + +TemplateLearningExperienceType.propTypes = { + model: PropTypes.instanceOf(Map).isRequired, + orgTimezone: PropTypes.string.isRequired, +}; + +export default TemplateLearningExperienceType; diff --git a/ui/src/containers/Visualisations/VisualisationViewer.js b/ui/src/containers/Visualisations/VisualisationViewer.js index 2d7171cf1c..ae3e4ce05f 100644 --- a/ui/src/containers/Visualisations/VisualisationViewer.js +++ b/ui/src/containers/Visualisations/VisualisationViewer.js @@ -21,6 +21,7 @@ import { TEMPLATE_CURATR_USER_ENGAGEMENT_LEADERBOARD, TEMPLATE_CURATR_PROPORTION_OF_SOCIAL_INTERACTIONS, TEMPLATE_CURATR_ACTIVITIES_WITH_MOST_COMMENTS, + TEMPLATE_LEARNING_EXPERIENCE_TYPE, } from 'lib/constants/visualise'; import { withModel } from 'ui/utils/hocs'; import CustomBarChartViewer from './CustomBarChart/Viewer'; @@ -41,6 +42,7 @@ import TemplateCuratrLearnerInteractionsByDateAndVerb from './TemplateCuratrLear import TemplateCuratrUserEngagementLeaderboard from './TemplateCuratrUserEngagementLeaderboard/Viewer'; import TemplateCuratrProportionOfSocialInteractions from './TemplateCuratrProportionOfSocialInteractions/Viewer'; import TemplateCuratrActivitiesWithMostComments from './TemplateCuratrActivitiesWithMostComments/Viewer'; +import TemplateLearningExperienceType from './TemplateLearningExperienceType/Viewer'; /** * @param {immutable.Map} model - visualisation model @@ -93,6 +95,8 @@ const VisualisationViewer = ({ return ; case TEMPLATE_CURATR_ACTIVITIES_WITH_MOST_COMMENTS: return ; + case TEMPLATE_LEARNING_EXPERIENCE_TYPE: + return ; default: console.error(`VisualisationViewer.js does not support type "${type}"`); return `Type "${type}" is not supported`; diff --git a/ui/src/containers/VisualiseForm/NewVisualisation/TemplateCardList.js b/ui/src/containers/VisualiseForm/NewVisualisation/TemplateCardList.js index 4015820644..8cb21f90f2 100644 --- a/ui/src/containers/VisualiseForm/NewVisualisation/TemplateCardList.js +++ b/ui/src/containers/VisualiseForm/NewVisualisation/TemplateCardList.js @@ -12,6 +12,7 @@ import TemplateCuratrLearnerInteractionsByDateAndVerbCard from 'ui/containers/Vi import TemplateCuratrUserEngagementLeaderboardCard from 'ui/containers/Visualisations/TemplateCuratrUserEngagementLeaderboard/Card'; import TemplateCuratrProportionOfSocialInteractionsCard from 'ui/containers/Visualisations/TemplateCuratrProportionOfSocialInteractions/Card'; import TemplateCuratrActivitiesWithMostCommentsCard from 'ui/containers/Visualisations/TemplateCuratrActivitiesWithMostComments/Card'; +import TemplateLearningExperienceType from 'ui/containers/Visualisations/TemplateLearningExperienceType/Card'; import styles from './styles.css'; const TemplateCardList = ({ model, saveModel }) => ( @@ -19,6 +20,10 @@ const TemplateCardList = ({ model, saveModel }) => ( id="new-visualisation-templates" className={styles.cardList}> + + diff --git a/ui/src/containers/VisualiseForm/index.js b/ui/src/containers/VisualiseForm/index.js index 0cb9ea62ae..f2d82ad367 100644 --- a/ui/src/containers/VisualiseForm/index.js +++ b/ui/src/containers/VisualiseForm/index.js @@ -18,6 +18,7 @@ import { TEMPLATE_CURATR_USER_ENGAGEMENT_LEADERBOARD, TEMPLATE_CURATR_PROPORTION_OF_SOCIAL_INTERACTIONS, TEMPLATE_CURATR_ACTIVITIES_WITH_MOST_COMMENTS, + TEMPLATE_LEARNING_EXPERIENCE_TYPE, } from 'lib/constants/visualise'; import CustomBarChart from 'ui/containers/Visualisations/CustomBarChart'; import CustomColumnChart from 'ui/containers/Visualisations/CustomColumnChart'; @@ -37,6 +38,7 @@ import TemplateCuratrLearnerInteractionsByDateAndVerb from 'ui/containers/Visual import TemplateCuratrUserEngagementLeaderboard from 'ui/containers/Visualisations/TemplateCuratrUserEngagementLeaderboard'; import TemplateCuratrProportionOfSocialInteractions from 'ui/containers/Visualisations/TemplateCuratrProportionOfSocialInteractions'; import TemplateCuratrActivitiesWithMostComments from 'ui/containers/Visualisations/TemplateCuratrActivitiesWithMostComments'; +import TemplateLearningExperienceType from 'ui/containers/Visualisations/TemplateLearningExperienceType'; import NewVisualisation from './NewVisualisation'; const VisualiseForm = ({ model, orgTimezone }) => { @@ -78,6 +80,8 @@ const VisualiseForm = ({ model, orgTimezone }) => { return ; case TEMPLATE_CURATR_ACTIVITIES_WITH_MOST_COMMENTS: return ; + case TEMPLATE_LEARNING_EXPERIENCE_TYPE: + return ; default: console.error(`VisualiseForm/index.js does not support type ${model.get('type')}`); return `type "${model.get('type')}" is not supported.`; diff --git a/ui/src/containers/VisualiseResults/SourceResults.js b/ui/src/containers/VisualiseResults/SourceResults.js index da71ebd6f4..e8b099a340 100644 --- a/ui/src/containers/VisualiseResults/SourceResults.js +++ b/ui/src/containers/VisualiseResults/SourceResults.js @@ -11,6 +11,7 @@ import { TEMPLATE_MOST_POPULAR_ACTIVITIES, TEMPLATE_MOST_POPULAR_VERBS, TEMPLATE_CURATR_INTERACTIONS_VS_ENGAGEMENT, + TEMPLATE_LEARNING_EXPERIENCE_TYPE } from 'lib/constants/visualise'; import NoData from 'ui/components/Graphs/NoData'; import ScrollableTable from 'ui/components/ScrollableTable'; @@ -87,6 +88,7 @@ const getGroupAxisLabel = (visualisation) => { case TEMPLATE_MOST_ACTIVE_PEOPLE: case TEMPLATE_MOST_POPULAR_ACTIVITIES: case TEMPLATE_MOST_POPULAR_VERBS: + case TEMPLATE_LEARNING_EXPERIENCE_TYPE: return visualisation.get('axesyLabel') || visualisation.getIn(['axesgroup', 'searchString']) || 'Y Axis'; // Line Chart type case FREQUENCY: @@ -111,7 +113,8 @@ const getValueAxisLabel = (index, visualisation) => { case TEMPLATE_MOST_ACTIVE_PEOPLE: case TEMPLATE_MOST_POPULAR_ACTIVITIES: case TEMPLATE_MOST_POPULAR_VERBS: - return visualisation.get('axesxLabel') || visualisation.getIn(['axesvalue', 'searchString']) || 'X Axis'; + case TEMPLATE_LEARNING_EXPERIENCE_TYPE: + return visualisation.get('axesxLabel') || visualisation.getIn(['axesxValue', 'searchString']) || 'X Axis'; default: return visualisation.get('axesyLabel') || visualisation.getIn(['axesvalue', 'searchString']) || 'Y Axis'; } diff --git a/ui/src/redux/modules/dashboard/curatrStarter.js b/ui/src/redux/modules/dashboard/curatrStarter.js index d2b9487ad8..f7fc7b7dd4 100644 --- a/ui/src/redux/modules/dashboard/curatrStarter.js +++ b/ui/src/redux/modules/dashboard/curatrStarter.js @@ -8,6 +8,7 @@ import buildTemplateCuratrCommentCount from 'ui/containers/Visualisations/Templa import buildTemplateCuratrLearnerInteractionsByDateAndVerb from 'ui/containers/Visualisations/TemplateCuratrLearnerInteractionsByDateAndVerb/buildModel'; import buildTemplateCuratrUserEngagementLeaderboard from 'ui/containers/Visualisations/TemplateCuratrUserEngagementLeaderboard/buildModel'; import buildTemplateLast7DaysStatements from 'ui/containers/Visualisations/TemplateLast7DaysStatements/buildModel'; +import buildTemplateLearningExperienceType from 'ui/containers/Visualisations/TemplateLearningExperienceType/buildModel'; import { addModel } from '../models'; export const CREATE_CURATR_STARTER = 'learninglocker/dashboard/CREATE_CURATR_STARTER'; @@ -53,6 +54,11 @@ const createVisualisations = async ({ dispatch, userId }) => { schema: 'visualisation', props: buildTemplateLast7DaysStatements(new Map({ owner: userId })), isExpanded: false, + })), + dispatch(addModel({ + schema: 'visualisation', + props: buildTemplateLearningExperienceType(new Map({ owner: userId })), + isExpanded: false, })) ]); diff --git a/ui/src/redux/modules/dashboard/gettingStarted.js b/ui/src/redux/modules/dashboard/gettingStarted.js index ee72f989f6..e51a06e9c5 100644 --- a/ui/src/redux/modules/dashboard/gettingStarted.js +++ b/ui/src/redux/modules/dashboard/gettingStarted.js @@ -7,6 +7,7 @@ import buildTemplateMostActivePeople from 'ui/containers/Visualisations/Template import buildTemplateMostPopularActivities from 'ui/containers/Visualisations/TemplateMostPopularActivities/buildModel'; import buildTemplateMostPopularVerbs from 'ui/containers/Visualisations/TemplateMostPopularVerbs/buildModel'; import buildTemplateWeekdaysActivity from 'ui/containers/Visualisations/TemplateWeekdaysActivity/buildModel'; +import buildTemplateLearningExperienceType from 'ui/containers/Visualisations/TemplateLearningExperienceType/buildModel'; import { addModel } from '../models'; export const CREATE_GETTING_STARTED = 'learninglocker/dashboard/CREATE_GETTING_STARTED'; @@ -48,6 +49,11 @@ const createVisualisations = async ({ dispatch, userId }) => { props: buildTemplateWeekdaysActivity(new Map({ owner: userId })), isExpanded: false, })), + dispatch(addModel({ + schema: 'visualisation', + props: buildTemplateLearningExperienceType(new Map({ owner: userId })), + isExpanded: false, + })) ]); return results.map(r => r.model.get('_id')); diff --git a/ui/src/utils/aggregation.js b/ui/src/utils/aggregation.js index 79feb344c6..7fd2674644 100644 --- a/ui/src/utils/aggregation.js +++ b/ui/src/utils/aggregation.js @@ -99,6 +99,29 @@ const contextLanguages = [ { $sort: { _id: 1 } } ]; +const experienceType = [ + { $match: { 'statement.context.contextActivities.grouping': { $exists: true } } }, + { $unwind: '$statement.context.contextActivities.grouping' }, + { $match: { 'statement.context.contextActivities.grouping.definition.type': 'https://curatrlxp.com/activitytype/learning-experience-type' } }, + { $project: { + group: '$statement.context.contextActivities.grouping', + model: '$statement.context.contextActivities.grouping' + } }, + { $group: { + _id: '$group', + count: { $sum: 1 }, + group: { $first: '$group' }, + model: { $first: '$model' } + } }, + { $sort: { count: -1 } }, + { $limit: 10000 }, + { $project: { + _id: 1, + count: 1, + model: 1 + } } +]; + export { actors, @@ -112,4 +135,5 @@ export { contextPlatforms, contextInstructors, contextLanguages, + experienceType, }; diff --git a/ui/src/utils/defaultTitles.js b/ui/src/utils/defaultTitles.js index e5a439cd64..199a2ce3b6 100644 --- a/ui/src/utils/defaultTitles.js +++ b/ui/src/utils/defaultTitles.js @@ -19,6 +19,7 @@ import { TEMPLATE_CURATR_USER_ENGAGEMENT_LEADERBOARD, TEMPLATE_CURATR_PROPORTION_OF_SOCIAL_INTERACTIONS, TEMPLATE_CURATR_ACTIVITIES_WITH_MOST_COMMENTS, + TEMPLATE_LEARNING_EXPERIENCE_TYPE, } from 'lib/constants/visualise'; import VisualiseIcon from 'ui/components/VisualiseIcon'; import { OPERATOR_OPTS } from 'ui/utils/visualisations/localOptions'; @@ -81,6 +82,7 @@ export const createDefaultTitle = (model) => { case TEMPLATE_MOST_ACTIVE_PEOPLE: case TEMPLATE_MOST_POPULAR_ACTIVITIES: case TEMPLATE_MOST_POPULAR_VERBS: + case TEMPLATE_LEARNING_EXPERIENCE_TYPE: case TEMPLATE_CURATR_USER_ENGAGEMENT_LEADERBOARD: case TEMPLATE_CURATR_ACTIVITIES_WITH_MOST_COMMENTS: return addYX(select(axg), select(axv) || select(ayV) || 'Time'); diff --git a/ui/src/utils/visualisations/localOptions.js b/ui/src/utils/visualisations/localOptions.js index 7d36eb05bd..0ae4e6acb2 100644 --- a/ui/src/utils/visualisations/localOptions.js +++ b/ui/src/utils/visualisations/localOptions.js @@ -18,6 +18,7 @@ import { TEMPLATE_CURATR_USER_ENGAGEMENT_LEADERBOARD, TEMPLATE_CURATR_PROPORTION_OF_SOCIAL_INTERACTIONS, TEMPLATE_CURATR_ACTIVITIES_WITH_MOST_COMMENTS, + TEMPLATE_LEARNING_EXPERIENCE_TYPE, } from 'lib/constants/visualise'; const createOptionModel = (searchString, optionKey) => new Map({ optionKey, searchString }); @@ -92,6 +93,7 @@ export const getTypeOpts = (type) => { case TEMPLATE_CURATR_USER_ENGAGEMENT_LEADERBOARD: case TEMPLATE_CURATR_PROPORTION_OF_SOCIAL_INTERACTIONS: case TEMPLATE_CURATR_ACTIVITIES_WITH_MOST_COMMENTS: + case TEMPLATE_LEARNING_EXPERIENCE_TYPE: return OPERATOR_OPTS; default: return new OrderedMap(); diff --git a/ui/src/utils/visualisations/pipelineFromQuery.js b/ui/src/utils/visualisations/pipelineFromQuery.js index 56600c7934..fe6f2fca80 100644 --- a/ui/src/utils/visualisations/pipelineFromQuery.js +++ b/ui/src/utils/visualisations/pipelineFromQuery.js @@ -19,6 +19,7 @@ import { TEMPLATE_CURATR_USER_ENGAGEMENT_LEADERBOARD, TEMPLATE_CURATR_PROPORTION_OF_SOCIAL_INTERACTIONS, TEMPLATE_CURATR_ACTIVITIES_WITH_MOST_COMMENTS, + TEMPLATE_LEARNING_EXPERIENCE_TYPE, } from 'lib/constants/visualise'; import { update$dteTimezone } from 'lib/helpers/update$dteTimezone'; import { periodToDate } from 'ui/utils/dates'; @@ -71,6 +72,7 @@ export default memoize((args = new Map()) => { case TEMPLATE_CURATR_USER_ENGAGEMENT_LEADERBOARD: case TEMPLATE_CURATR_PROPORTION_OF_SOCIAL_INTERACTIONS: case TEMPLATE_CURATR_ACTIVITIES_WITH_MOST_COMMENTS: + case TEMPLATE_LEARNING_EXPERIENCE_TYPE: return aggregateChart(preReqs, axes, timezone); case XVSY: case TEMPLATE_CURATR_INTERACTIONS_VS_ENGAGEMENT: