{"id":14113,"date":"2024-06-17T11:48:08","date_gmt":"2024-06-17T16:48:08","guid":{"rendered":"https:\/\/www.mrc-productivity.com\/docs\/?post_type=ht_kb&#038;p=14113"},"modified":"2024-08-20T11:43:45","modified_gmt":"2024-08-20T16:43:45","slug":"charting-in-mpower","status":"publish","type":"ht_kb","link":"https:\/\/www.mrc-productivity.com\/docs\/knowledge-base\/charting-in-mpower","title":{"rendered":"Charting in m-Power"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Overview<\/h2>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-info\">The graphing features shown in this document were introduced in the June 2024 m-Power update.<\/p>\n\n\n\n<p>This document will provide an overview on building charts in the <a href=\"\/docs\/knowledge-base\/when-to-use-which-version-of-m-painter#latest-m-painter\" target=\"_blank\" rel=\"noreferrer noopener\">latest m-Painter<\/a> and within the dashboarding utility. Several key features of m-Power&#8217;s charting capabilities include:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The ability to source your chart data from an m-Power application or a <a href=\"\/docs\/knowledge-base\/m-power-data-models\" target=\"_blank\" rel=\"noreferrer noopener\">Data Model<\/a>.<\/li>\n\n\n\n<li>Integration of the charting UI in m-Painter editor, allowing developers to create a chart inside any application of their choosing (Retrieval, Report, Maintainer) as they customize the app&#8217;s presentation.<\/li>\n\n\n\n<li>Integration of the charting UI in m-Power&#8217;s <a href=\"\/docs\/knowledge-base\/creating-and-customizing-dashboards\" target=\"_blank\" rel=\"noreferrer noopener\">dashboarding utility<\/a>, providing developers a more streamlined process when creating and configuring charts for their dashboard.<\/li>\n\n\n\n<li>Real-time previews of the chart data and output during the chart creation. <\/li>\n\n\n\n<li>Utilization of the <a href=\"https:\/\/echarts.apache.org\/en\/index.html\" target=\"_blank\" rel=\"noreferrer noopener\">Apache Echarts<\/a> library, allowing developers to implement a wide array of customizations to their charts.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"section1\">Inserting a chart&#8230;<\/h2>\n\n\n\n<p>Charts may be inserted into the m-Power application or a m-Power dashboard. Both methods are shown below:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"section1\">&#8230;In a m-Power application<\/h3>\n\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;69df236fa707d&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"69df236fa707d\" class=\"wp-block-image size-large wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"\/docs\/images\/charting1.png\" alt=\"\"\/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\taria-label=\"Enlarge\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.imageButtonRight\"\n\t\t\tdata-wp-style--top=\"state.imageButtonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><figcaption class=\"wp-element-caption\">Figure 1. A Multiple Row Data List retrieval with a chart<\/figcaption><\/figure>\n\n\n\n<p>For developers wanting to insert a chart into an application, this is done via the m-Painter editor. <\/p>\n\n\n\n<p>Inside m-Painter, first click inside the space you have created for your graph and then click the &#8220;Chart&#8221; option within the Featured Components menu to open the Chart UI:<\/p>\n\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;69df236fa72f2&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"69df236fa72f2\" class=\"wp-block-image size-large wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"\/docs\/images\/charting2.png\" alt=\"\"\/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\taria-label=\"Enlarge\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.imageButtonRight\"\n\t\t\tdata-wp-style--top=\"state.imageButtonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><figcaption class=\"wp-element-caption\">Figure 2. Inserting a chart via the m-Painter editor<\/figcaption><\/figure>\n\n\n\n<p>From this point forward, please proceed to the &#8220;Using the Chart UI&#8221; section for learning about the different options and configurations for charts.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">&#8230;Into a m-Power dashboard<\/h3>\n\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;69df236fa74e8&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"69df236fa74e8\" class=\"wp-block-image size-large wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"\/docs\/images\/charting3.png\" alt=\"\"\/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\taria-label=\"Enlarge\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.imageButtonRight\"\n\t\t\tdata-wp-style--top=\"state.imageButtonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><figcaption class=\"wp-element-caption\">Figure 3. A m-Power dashboard with a chart.<\/figcaption><\/figure>\n\n\n\n<p>As opposed to inserting a chart into an application, this section will show how developers can insert charts into an existing dashboard. <\/p>\n\n\n\n<p>Run the existing dashboard and press the plus icon on a blank portlet within the dashboard:<\/p>\n\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;69df236fa76ef&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"69df236fa76ef\" class=\"wp-block-image size-large wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"\/docs\/images\/charting4.png\" alt=\"\"\/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\taria-label=\"Enlarge\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.imageButtonRight\"\n\t\t\tdata-wp-style--top=\"state.imageButtonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><figcaption class=\"wp-element-caption\">Figure 4. Inserting a chart into a dashboard<\/figcaption><\/figure>\n\n\n\n<p>In the &#8216;Add Dashboard Item&#8217; screen, select the option to &#8220;Create a Chart&#8221;:<\/p>\n\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;69df236fa78a7&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"69df236fa78a7\" class=\"wp-block-image size-large wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"\/docs\/images\/charting5.png\" alt=\"\"\/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\taria-label=\"Enlarge\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.imageButtonRight\"\n\t\t\tdata-wp-style--top=\"state.imageButtonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><figcaption class=\"wp-element-caption\">Figure 5. Selecting to Create a Chart from the charting UI.<\/figcaption><\/figure>\n\n\n\n<p>From this point forward, please proceed to the &#8220;Using the Chart UI&#8221; section for learning about the different options and configurations for charts.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Using the Chart UI<\/h2>\n\n\n\n<p>The first option of the chart UI will be to specify the chart&#8217;s data source, as shown in Figure 6. The data must be sourced from either an m-Power application or Data Model. This example will utilize a Data Model that is built over some sales data.<\/p>\n\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;69df236fa7ac4&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"69df236fa7ac4\" class=\"wp-block-image size-large wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"\/docs\/images\/charting6.png\" alt=\"\"\/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\taria-label=\"Enlarge\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.imageButtonRight\"\n\t\t\tdata-wp-style--top=\"state.imageButtonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><figcaption class=\"wp-element-caption\">Figure 6. Selecting the data source for the chart.<\/figcaption><\/figure>\n\n\n\n<p>When selecting the data source, whether application or Data Model, developers may utilize the Configure Data screen to pass any additional parameters to filter the chart&#8217;s data set (as shown in Figure 7). Otherwise, just press the next button at the bottom right to proceed.<\/p>\n\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;69df236fa7c84&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"69df236fa7c84\" class=\"wp-block-image size-large wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"\/docs\/images\/charting7.png\" alt=\"\"\/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\taria-label=\"Enlarge\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.imageButtonRight\"\n\t\t\tdata-wp-style--top=\"state.imageButtonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><figcaption class=\"wp-element-caption\">Figure 7. Configuring the selected data source for the chart<\/figcaption><\/figure>\n\n\n\n<p>The Configure Chart screen, shown below in Figure 8 is where the chart specific options are configured.<\/p>\n\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;69df236fa7e49&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"69df236fa7e49\" class=\"wp-block-image size-large wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"\/docs\/images\/charting8.png\" alt=\"\"\/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\taria-label=\"Enlarge\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.imageButtonRight\"\n\t\t\tdata-wp-style--top=\"state.imageButtonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><figcaption class=\"wp-element-caption\">Figure 8. The Configure Chart UI, where customizing the graph is done.<\/figcaption><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Chart Options<\/h3>\n\n\n\n<p>Various parts of the Configure Chart screen in Figure 8 will be discussed in further depth. Focusing on the left-most options include:<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\"><div class=\"wp-block-image\">\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;69df236fa8093&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"69df236fa8093\" class=\"aligncenter size-large is-resized wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"\/docs\/images\/charting9.png\" alt=\"\" style=\"width:318px;height:auto\"\/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\taria-label=\"Enlarge\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.imageButtonRight\"\n\t\t\tdata-wp-style--top=\"state.imageButtonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><figcaption class=\"wp-element-caption\">Figure 9. Various configurable chart options<\/figcaption><\/figure>\n<\/div><\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<ul class=\"wp-block-list\">\n<li><strong>A &#8211; Chart Title<\/strong> (required)\n<ul class=\"wp-block-list\">\n<li>Provide a name for the chart. The name will also serve as the title for the chart at runtime, if enabled in the  <em>Title and Axis<\/em> section (D). <\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>B &#8211; Chart Type* <\/strong>(required)\n<ul class=\"wp-block-list\">\n<li>Select the chart output type (Bar, Pie, Line, etc.).<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>C &#8211; Data Labels<\/strong>\n<ul class=\"wp-block-list\">\n<li>Options include the ability to show a legend on the chart and the ability to show the data values on the chart.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>D &#8211; Title and Axis<\/strong>\n<ul class=\"wp-block-list\">\n<li>Use to show a chart title at runtime, as well as control the text and boundaries of the x-axis and y-axis of the chart. <\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>E &#8211; General Options<\/strong>\n<ul class=\"wp-block-list\">\n<li>Set different sizing and margin options for the chart, as well as configure drilldown links. For developers wanting advanced customizations the graph template may be customized from here.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>F &#8211; Colors<\/strong>\n<ul class=\"wp-block-list\">\n<li>Set the theme and displayed colors associated with the chart output.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-info\">*<strong>Note<\/strong>: Depending on the Chart Type selected, various options that are presented in the menus in Figure 9 may be shown\/hidden. <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Chart Fields and Preview Pane<\/h3>\n\n\n\n<p>On the right-most side of the Configure Chart window, a developer will choose the Chart Fields and Group Fields for the chart, as shown in Figure 10.<\/p>\n\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;69df236fa89de&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"69df236fa89de\" class=\"wp-block-image size-large wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"\/docs\/images\/charting10.png\" alt=\"\"\/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\taria-label=\"Enlarge\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.imageButtonRight\"\n\t\t\tdata-wp-style--top=\"state.imageButtonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><figcaption class=\"wp-element-caption\">Figure 10. A preview of the chart is shown, based on the selected Chart and Group fields.<\/figcaption><\/figure>\n\n\n\n<p><strong>Chart Fields<\/strong> will typically be values such as sales, quantity, units, count, etc. and serve as the numeric values a developer is interested in totaling or displaying as a percentage in the chart output.<\/p>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-info\">Any <span style=\"text-decoration: underline;\">numeric, non-Dimension fields<\/span> in the underlying dataset will be selectable as Chart Fields.<\/p>\n\n\n\n<p><strong>Group Fields<\/strong> on the other hand define how the data is grouped for the chart. Good examples include customer, year, quarter, product, ship date, etc. <\/p>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-info\">Any <span style=\"text-decoration: underline;\">Dimension fields<\/span> in the underlying dataset will be selectable as Group Fields.<\/p>\n\n\n\n<p>After selecting the necessary fields, pressing the &#8216;Preview&#8217; option will render a preview of the current chart that has been configured.<\/p>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon\">Note that depending on the selected chart type, multiple Group Fields or Chart Fields may be selected.<\/p>\n\n\n\n<p>To examine the underlying data the chart is utilizing for the output, pressing the &#8216;Data&#8217; tab (as shown in Figure 11) will display the queried data. The left-most columns are shaded with a grey-background to indicate their selection as a Chart Field or Group Field.<\/p>\n\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;69df236fa8fa6&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"69df236fa8fa6\" class=\"wp-block-image size-large wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"\/docs\/images\/charting11.png\" alt=\"\"\/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\taria-label=\"Enlarge\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.imageButtonRight\"\n\t\t\tdata-wp-style--top=\"state.imageButtonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><figcaption class=\"wp-element-caption\">Figure 11. The &#8216;Data&#8217; tab previews the underlying dataset utilized by the Chart<\/figcaption><\/figure>\n\n\n\n<p>A developer may also view the chart template source code using the &#8216;Template&#8217; option (Figure 12). The template source code is by default in a read-only mode, however the ability to edit the source directly is enabled by selecting the &#8216;Customize&#8217; button in the <em>General Options<\/em>.<\/p>\n\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;69df236fa918a&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"69df236fa918a\" class=\"wp-block-image size-large wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"\/docs\/images\/charting12.png\" alt=\"\"\/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\taria-label=\"Enlarge\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.imageButtonRight\"\n\t\t\tdata-wp-style--top=\"state.imageButtonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><figcaption class=\"wp-element-caption\">Figure 12. In the Preview Pane, selecting &#8216;Template&#8217; displays the chart source code.<\/figcaption><\/figure>\n\n\n\n<p>Once the appropriate configurations have been made, press the green &#8216;Finish&#8217; button in the charting UI. If the chart is being inserted into an m-Power application, be sure to additionally save m-Painter.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Editing an existing chart<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Charts in an m-Power application<\/h3>\n\n\n\n<p>Using Figure 13 as a reference, note that m-Painter will show the developer a stock image of a bar chart (as opposed to the actual selected chart type). To go edit the chart, simply click the &#8216;Edit&#8217; option in the light-blue selected element menu or select &#8216;Edit Chart&#8217; from the Element Options menu on the far-right side of m-Painter to bring up the charting UI.<\/p>\n\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;69df236fa93c8&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"69df236fa93c8\" class=\"wp-block-image size-large wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"\/docs\/images\/charting13.png\" alt=\"\"\/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\taria-label=\"Enlarge\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.imageButtonRight\"\n\t\t\tdata-wp-style--top=\"state.imageButtonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><figcaption class=\"wp-element-caption\">Figure 13. How to edit an existing chart in m-Painter<\/figcaption><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Charts in an m-Power dashboard<\/h3>\n\n\n\n<p>Using Figure 14 as a reference, click the gear icon on the portlet that contains the chart then press &#8216;Edit&#8217; to bring up the charting UI.<\/p>\n\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;69df236fa95c2&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"69df236fa95c2\" class=\"wp-block-image size-large wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"\/docs\/images\/charting14.png\" alt=\"\"\/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\taria-label=\"Enlarge\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.imageButtonRight\"\n\t\t\tdata-wp-style--top=\"state.imageButtonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><figcaption class=\"wp-element-caption\">Figure 14 &#8211; Editing a chart in a dashboard.<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Promoting to Production<\/h2>\n\n\n\n<p>To promote charts to production the underlying data source, whether an m-Power application or a Data Model, must be promoted to production. <\/p>\n\n\n\n<p>If a custom graph template has been created, move over the appropriate .FTL file in &#8230;\/m-power\/mrcjava\/mrcclasses\/mrc-graph-templates\/v2\/custom to the same directory in production. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>This document will cover how to use the graphing utility in m-Painter. <\/p>\n","protected":false},"author":2,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":{"footnotes":""},"ht-kb-category":[308],"ht-kb-tag":[],"class_list":["post-14113","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-latest-charting"],"_links":{"self":[{"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb\/14113","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/comments?post=14113"}],"version-history":[{"count":81,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb\/14113\/revisions"}],"predecessor-version":[{"id":14243,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb\/14113\/revisions\/14243"}],"wp:attachment":[{"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/media?parent=14113"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb-category?post=14113"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb-tag?post=14113"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}