Skip to main content

What’s New

Qrvey 8.7
Version 8.7 of the Qrvey platform is now available to customers! This version includes new features including area charts, the ability to pivot and export data, as well as numerous bug fixes and performance improvements.
Learn More
Qrvey 8.6
Version 8.6 of the Qrvey platform is now available to customers. This version includes several new feature enhancements and performance improvements.
Learn More
Required Update for 8.5.1
Attention 8.5.1 customers: for any 8.5.1 instance deployed prior to 08/05/2024, an update is required to ensure you are running the latest images.
Learn More
Qrvey 8.5
Version 8.5 (LTS) of the Qrvey platform is now available to customers. This version includes several new features and performance improvements.
Learn More
End-of-life Schedule
We've added a new article that lists the features and endpoints that have been scheduled for deprecation. All features and endpoints will be supported for (1) year after the release date of the LTS version that contains the alternative.
Learn More
Version: 8.0

Analytic Suite Widget

This widget allows the user to display the distinct views available on the analyze side (i.e Summary, Custom, Metric views), through a configuration object where properties are set to define some options and behaviors.

To obtain the specific configuration object for your environment, go to the Analyze tab for the desired dataset and click the Embed Analyze View icon in the top-right corner of any analysis view.

analytic-suite

This will open a dialog with the necessary code, including the “domain”, “app_id” and “user_id” property values. You can copy the code from here and include it in your application. You have to provide the unique API key value. The building blocks of the code are explained below:

HTML Tag And Launcher

The HTML tag for this widget is: <an-dashboard config=...>

Note: The configuration property for this widget is called “config”, unlike most other widgets where the same property is called “settings”.

This widget needs an extra script for proper support in all browsers.

<script type="module" src=”https://<WIDGETS_URL>/qrvey-an-widgets/an-dashboard/andashboard/andashboard.esm.js”></script> (For all browsers support)

<script nomodule src=”https://<WIDGETS_URL>/qrvey-an-widgets/an-dashboard/andashboard/andashboard.js”></script> (Widget launcher)

Configuration Object

The table below provides general information about each property of this widget’s configuration object, along with a description of the expected value. The Required column indicates whether the property is required for the configuration object to work properly.

PropertyValueRequired
api_keyString, secret identification token to access the application.Yes
app_idString, ID of the qrvey application containing the webform.Yes
user_idString, ID of the user that edits the widget.Yes
domainString, domain URL in which the application is in.Yes
qrveyidString, ID of the dataset being used.Yes
settingsObject, general configuration in order to set some behaviors.No
settings.viewString, determines the initial view to display and it accepts:
SUMMARY_VIEW/MULTI_PANEL
TABULAR_VIEW
CUSTOM_VIEW
METRIC_VIEW
Default: MULTI_PANEL (alias for SUMMARY_VIEW)
No
settings.modeString, determines displaying the complete layout or the views only. It depends on set view and it accepts:
COMPLETE
SIMPLE
* Default: COMPLETE
No
settings.displayModeString, changes the style and extends the layout onto the entire container.
FULL
NORMAL
* Default: NORMAL
No
userFiltersObject, the filters object generated by the user. This will be applied in internal components to filter the data. I.e. AN Single Panel.
{filters: <Filters Key Structure>}
No
themeidString, theme ID to use in the componentNo
settings.stylesObject, styles options object. These properties will extend from the current themeNo
settings.styles.chartsTitleString, set the charts title colorNo
settings.styles.chartsFontFamilyString, set the charts font familyNo
settings.styles.axisDataLabelsString, set axis labels color in chartsNo
settings.styles.dataLabelsString, color for data labels in chartsNo
settings.styles.valuesMainString, set color for axis ticks values in chartsNo
settings.styles.chartsLegendsString, color for charts legends labelsNo
settings.styles.chartsTooltipsString, color for charts tooltipsNo
settings.styles.tableHeaderFontString, set color for table header textsNo
settings.styles.chartsMainString, set color for chart data points like bars, symbols and lines.No
settings.styles.themePaletteArray, contains a maximum of 20 colors that will be used for chart data points.No
custom_tokensObject, contains a set of custom tokens, each of them in turn, receives an array of with the list of tokens.

{<custom token 1>: [<token 1>: “token 1”, <token 2>: “token 2”]}
No

Note: Refer to the FAQs if you don’t know where to find any of the required configuration properties.

Samples

The following samples show the way this widget is used in an HTML page. Please note that the example may not include the non-required properties of the configuration object.

You can copy and paste this code to your application after replacing the red values with your own valid values in order to see the embedded widget in action.

Basic Sample:

<an-dashboard config="configDashBoard"></an-dashboard>

<script>
var configDashBoard = {
"api_key": "<API_KEY>",
"app_id": "<APP_ID>",
"domain": "https://your_qrvey_domain",
"user_id": "<USER_ID>",
"qrveyid": "<QRVEY_ID>",
"settings": {
"view": "CUSTOM_VIEW"
}
}
</script>
<!-- your launcher js link (replace with your js link) -->
<script type="module" src="https://<WIDGETS_URL>/your_qrvey_an_widgets_container/an-dashboard/andashboard/andashboard.esm.js"></script>
<script nomodule src="https://<WIDGETS_URL>/your_qrvey_an_widgets_container/an-dashboard/andashboard/andashboard.js"></script>

Sample With the Filter Object Generated by a User:

`

`
<script>
var configDashBoard = {
"api_key": "<API_KEY>",
"app_id": "<APP_ID>",
"domain": "https://your_qrvey_domain",
"user_id": "<USER_ID>",
"qrveyid": "<QRVEY_ID>",
"userFilters": {
"filters": [{
"operator": "AND",
"expressions": [
{
"qrveyid": "<QRVEY_ID>",
"enabled": true,
"questionid": "<QUESTION_ID>",
"validationType": "<VALIDATION_TYPE>",
"value": [
"<VALUE_TO_FILTER_1>",
"<VALUE_TO_FILTER_2>"
]
}
]
}]
}
}
</script>
<script>
function applyNewFilter() {
window.dispatchEvent(new CustomEvent('anApplyUserFilters', {
detail: {
"filters": [{
"operator": "AND",
"expressions": [
{
"qrveyid": "<QRVEY_ID>"
"enabled": true,
"questionid": "<QUESTION_ID>",
"validationType": "<VALIDATION_TYPE>",
"value": [
"<VALUE_TO_FILTER_3>"
]
}
]
}]
}
}));
}
</script>
<!-- your launcher js link (replace with your js link) -->
<script type="module" src="https://<WIDGETS_URL>/your_qrvey_an_widgets_container/an-dashboard/andashboard/andashboard.esm.js"></script>
<script nomodule src="https://<WIDGETS_URL>/your_qrvey_an_widgets_container/an-dashboard/andashboard/andashboard.js"></script>

See the widget in CodePen: