{"id":787,"date":"2011-01-05T03:45:25","date_gmt":"2011-01-05T09:45:25","guid":{"rendered":"http:\/\/www.mrc-productivity.com\/docs\/?page_id=787"},"modified":"2024-08-20T11:03:39","modified_gmt":"2024-08-20T16:03:39","slug":"introduction-to-m-power-graphing","status":"publish","type":"ht_kb","link":"https:\/\/www.mrc-productivity.com\/docs\/knowledge-base\/introduction-to-m-power-graphing","title":{"rendered":"Graphing Interface Overview"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\" id=\"general\">General Information<\/h2>\n\n\n\n<p>The m-Power graphing library supports graphing options that are Flash powered (or JavaScript, if Flash is unavailable) and offer a wide variety of graphing options for the developer to consider. Click <a href=\"\/Products\/charts.html\" target=\"_blank\" rel=\"noopener\">here<\/a> to see some of the graphs that are available to be created via the m-Power platform.<\/p>\n\n\n\n<p>Graphs add visual detail and style to reports, as well as improving functionality. m-Power offers a graphing interface for ease of use during the graph-design process. In this example, we will be working over three fields in the order detail file: Product Number, Quantity Shipped, and Price. Detail rows have been removed, and we&#8217;re subtotaling by product number so we see the total quantity and sales for each product. Our table looks like this:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"\/docs\/vue-images\/orderedProducts.jpg\"><img decoding=\"async\" src=\"\/docs\/vue-images\/orderedProducts.jpg\" alt=\"\"\/><\/a><\/figure>\n\n\n\n<p>When you open up graph properties in m-Painter, you&#8217;ll immediately see a change.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"\/docs\/images\/graphing\/graphprop1.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>You are now working in a tabbed interface that will help walk you through making your graphs. m-Power&#8217;s new interface has been designed to make designing graphs much more straightforward and less confusing.<\/p>\n\n\n\n<p>In the &#8220;Graph Type&#8221; tab you select which graph you want to use. Graphs are grouped by category: Bar, Line, Combination, Pie, and Other. In this example, we will make a 3D Pie chart that will show total sales by product number, so we&#8217;ll go to the &#8220;Pie&#8221; tab and select the &#8220;3D Pie&#8221; chart.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"\/docs\/images\/graphing\/3dpie.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>We can now move to the &#8220;Fields&#8221; tab. The default &#8220;Selected Fields&#8221; are &#8220;Shipped Quantity&#8221; and &#8220;List Price&#8221;. We only want to show price, so we&#8217;ll drag and drop &#8220;Shipped Quantity&#8221; back over to &#8220;Available Fields&#8221; so it doesn&#8217;t display on the chart.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"\/docs\/images\/graphing\/fields.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>If we click over to the &#8220;Levels&#8221; tab, we can select the level of detail we want your graph to show. In our case, we are looking for the total sales amount of each product number. These amounts appear on Subtotal Row 1, so we will select &#8220;Subtotal Level 1 PRDNO&#8221; as our report level.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"\/docs\/images\/graphlevels.jpg\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-info\">The Image Data Collection icon automatically moves when you select your level. This icon represents from which level your data is being pulled.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"\/docs\/images\/graphing\/icon.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>We can now move onto the &#8220;Descriptions&#8221; tab. Here, we can change the labels for our pie sections. You have the option to either type in a static label, select a field from the table to use, or you can do both, which is what we will do here. We&#8217;re going to use a field from the table (&#8220;Product Number&#8221;), and suffix it with &#8220;Total&#8221;. If we were just graphing a grand total row and wanted a completely static field, we would select the &#8220;Label&#8221; option, and type in our field description, such as &#8220;Total Sales&#8221;.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"\/docs\/images\/graphing\/graphLabels.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>We&#8217;ll now go to the &#8220;Options&#8221; tab.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"\/docs\/images\/graphing\/props.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>Here we can customize the look and feel of our graph. There are tabs all the way down the side with different categories of options to change. Lets leave these alone for a moment and see what our graph looks like.<\/p>\n\n\n\n<p>The last feature in the graphing interface is the &#8220;Graph Preview&#8221; tab. We can preview the graph without having to save and run our report. The &#8220;Graph Preview&#8221; tab allows you to obtain instant feedback on what your changes will look like in real time without having to run your report.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"\/docs\/images\/graphpreview.jpg\" alt=\"\"\/><\/figure>\n\n\n\n<p>In our preview, since our labels have two lines on them and because we have so many products, we&#8217;ll need to make our pie chart bigger to be able to see our totals, so we&#8217;ll go back to our &#8220;Options&#8221; tab and move to the &#8220;General&#8221; section. Here, we&#8217;ll make our graph 800 pixels wide and 400 pixels long. That should compensate for our larger labels.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"\/docs\/images\/graphresize.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>And if we look at the &#8220;Graph Preview&#8221;, sure enough, it does.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"\/docs\/images\/graphpreview2.jpg\" alt=\"\"\/><\/figure>\n\n\n\n<p>On the other hand, such a big graph might be too big for some users. We can bring the graph back down to its old size and change the threshold instead. The &#8220;Threshold&#8221; is a setting that filters smaller amounts into an &#8220;Others&#8221; category. If the threshold is raised, more fields will be placed into the &#8220;Others&#8221; category and won&#8217;t display on the screen.<\/p>\n\n\n\n<p>Back in the &#8220;Options&#8221; tab, we&#8217;ll return our width to 600 and our height to 300, and then switch to the &#8220;Chart and Plot&#8221; section. In there, we&#8217;ll pick the &#8220;Threshold&#8221; tab. The default threshold is 2%, meaning that if an amount is less than 2% of the grand total, it gets placed into the &#8220;Others&#8221; category. Let&#8217;s raise that value from .02 to .05.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"\/docs\/images\/threshold.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>That seems to have taken enough out to show everything in a readable format in the &#8220;Graph Preview&#8221;.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"\/docs\/images\/graphpreview3.jpg\" alt=\"\"\/><\/figure>\n\n\n\n<p>For developers who feel more comfortable with the a text based interface, you can switch to text mode by clicking on the &#8220;Legacy Mode&#8221; link directly to the right of the &#8220;Graph Image Options&#8221; text.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"\/docs\/images\/graphing\/legacy.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>If you click on it, you&#8217;ll be presented with a warning. <strong>Note:<\/strong> Flipping between legacy mode and wizard mode will lose any changes made to the graph properties if they haven&#8217;t been saved by clicking OK on the lower right hand side of the &#8220;Graph Properties&#8221; screen. If you&#8217;ve made changes that you haven&#8217;t saved and want to, click &#8220;Cancel&#8221; on the warning and save. Then open up graph properties and click on legacy mode again. This time, click &#8220;OK&#8221; when the warning comes up and you&#8217;ll be brought to the previous interface.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"\/docs\/images\/graphpropertieslegacymode.jpg\" alt=\"\"\/><\/figure>\n\n\n\n<p>Now that we&#8217;ve finished customizing our graph, we can run it. Here it is in a browser window when we run the report:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"\/docs\/images\/graphing\/finished.png\" alt=\"\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"convert\">Converting Between Graph Libraries<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Upgrading Existing Graphs<\/h3>\n\n\n\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<p>To convert your existing jFreecharts to use Fusion graphing logic, please do the following:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Recompile the application and choose to overwrite the Application Properties.<\/li>\n\n\n\n<li>Open m-Painter, go into source view. Find the code &#8220;&lt;\/head&gt;&#8221;. Directly before this, add the following code: <code>&lt;script src=\"\/mrcjava\/FusionCharts\/FusionCharts.js\"&gt;&lt;\/script&gt;<\/code><\/li>\n\n\n\n<li><span style=\"color: initial;\">Open m-Painter, and open Graph Properties. Select the appropriate Fusion chart, and then save this. The application is now set to work with Fusion charts.<\/span><\/li>\n<\/ol>\n<\/div><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Changing Graph Libraries<\/h3>\n\n\n\n<p>Some customers may choose to continue utilizing jFreecharts as their graphing library. To convert your graphs to do this, open application properties and navigate to the graph tab. Change the graphLibrary property to be set to &#8220;jFreeChart&#8221; and click accept. Next, open m-Painter, and open Graph Properties. Select the appropriate jFreechart, and then save this. The application is now set to work with jFreecharts.<\/p>\n\n\n\n<p>In the event you wish to revert back to Fusion Charts, simply reverse the above instructions.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"links\">Learn more about<\/h2>\n\n\n\n<p><a href=\"https:\/\/www.mrc-productivity.com\/docs\/graphs\/graph-type-tab\">Graph Type Tab<\/a><br><a href=\"https:\/\/www.mrc-productivity.com\/docs\/graphs\/fields-tab\">Fields Tab<\/a><br><a href=\"https:\/\/www.mrc-productivity.com\/docs\/graphs\/levels-tab\">Levels Tab<\/a><br><a href=\"https:\/\/www.mrc-productivity.com\/docs\/graphs\/descriptions-tab\">Descriptions Tab<\/a><br><a href=\"https:\/\/www.mrc-productivity.com\/docs\/graphs\/options-tab\/general-tab\">Options Tab<\/a><br><a href=\"https:\/\/www.mrc-productivity.com\/docs\/graphs\/options-tab\/general-tab\">General Tab<\/a><br><a href=\"https:\/\/www.mrc-productivity.com\/docs\/graphs\/options-tab\/title-tab\">Title Tab<\/a><br><a href=\"https:\/\/www.mrc-productivity.com\/docs\/graphs\/options-tab\/legend-tab\">Legend Tab<\/a><br><a href=\"https:\/\/www.mrc-productivity.com\/docs\/graphs\/options-tab\/tooltip-tab\">Tooltip Tab<\/a><br><a href=\"https:\/\/www.mrc-productivity.com\/docs\/graphs\/options-tab\/drilldown-tab\">Drilldown Tab<\/a><br><a href=\"https:\/\/www.mrc-productivity.com\/docs\/graphs\/options-tab\/chartplot-tab\">Chart\/Plot Tab<\/a><\/p>\n\n\n\n<p>To review information on how to create graphs via the jFreeChart library, which is now deprecated, please click <a href=\"\/docs\/jFreeCharts.pdf\" target=\"_blank\" rel=\"noopener\">here<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>General Information The m-Power graphing library supports graphing options that are Flash powered (or JavaScript, if Flash is unavailable) and offer a wide variety of graphing options for the developer to consider. Click here to see some of the graphs that are available to be created via the m-Power platform&#8230;.<\/p>\n","protected":false},"author":1,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":{"footnotes":""},"ht-kb-category":[307],"ht-kb-tag":[],"class_list":["post-787","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-legacy-charting"],"_links":{"self":[{"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb\/787","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\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/comments?post=787"}],"version-history":[{"count":44,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb\/787\/revisions"}],"predecessor-version":[{"id":13179,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb\/787\/revisions\/13179"}],"wp:attachment":[{"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/media?parent=787"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb-category?post=787"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb-tag?post=787"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}