{"id":1087,"date":"2008-04-11T03:45:44","date_gmt":"2008-04-11T08:45:44","guid":{"rendered":"http:\/\/www.mrc-productivity.com\/docs\/?page_id=1087"},"modified":"2024-08-20T11:42:37","modified_gmt":"2024-08-20T16:42:37","slug":"creating-a-line-graph-with-a-static-goal-line","status":"publish","type":"ht_kb","link":"https:\/\/www.mrc-productivity.com\/docs\/knowledge-base\/creating-a-line-graph-with-a-static-goal-line","title":{"rendered":"Creating a Line Graph with a Static &#8220;Goal Line&#8221;"},"content":{"rendered":"\n<p>Often times when creating a Line Graph, you will have a need to create a &#8220;Goal Line&#8221; (or Reference Line) that will serve as a constant horizontal line to track if you have met a certain goal. Setting this up with a Report with Graph is very straightforward. In the following example, I am going to print a set of users Credit Limit, and compare that with a static &#8220;Target&#8221; goal.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Goal Line<\/h2>\n\n\n\n<p>Below, you can see I plan on graphing the Credit Limit Field (CRLIM).<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"\/docs\/vue-images\/staticline1.jpg\" alt=\"\"\/><\/figure>\n\n\n\n<p>However, I need to create a target goal; this can easily be done with a calculation. I will set my calculation to $15,000.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"\/docs\/vue-images\/staticline2.jpg\" alt=\"\"\/><\/figure>\n\n\n\n<p>As you can see, I have simply set a calculation equal to 15000.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">m-Painter Changes<\/h2>\n\n\n\n<p>After I build my application, I must go into m-Painter. The first thing I will do is remove the calculation column. Since this will only be used in the graph logic, it does not need to be present in my output table. Simply right-click on the column, and select &#8220;Delete Column&#8221;.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"\/docs\/vue-images\/staticline3.jpg\" alt=\"\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Graph Properties<\/h2>\n\n\n\n<p>Next, I will need to modify the Graph Properties. To do this, right-click on the graph, and select &#8220;Graph Properties&#8221;.<\/p>\n\n\n\n<p>The first thing that we will need to do is select the &#8220;Multiple Line&#8221; graph on the &#8220;Line&#8221; tab.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"\/docs\/vue-images\/staticline4.jpg\" alt=\"\"\/><\/figure>\n\n\n\n<p>Then, select the &#8220;Credit Limit in Dollars&#8221; and &#8220;Credit Limit Target&#8221; fields on the &#8220;Fields&#8221; tab.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"\/docs\/images\/staticline5.jpg\" alt=\"\"\/><\/figure>\n\n\n\n<p>Next, on the &#8220;Levels&#8221; tab, we need to change the level to the &#8220;Detail Level&#8221;, not the &#8220;Grand Total Level&#8221;. This is necessary because we need to have data for each individual customer, not just the grand total.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"\/docs\/images\/staticline6.jpg\" alt=\"\"\/><\/figure>\n\n\n\n<p>Before we finish, we need to make one more slight change. Click the &#8220;Options&#8221; tab and then select the &#8220;Chart and Plot&#8221; section. Set the &#8220;Show X Axis Item Values?&#8221; value to &#8220;No&#8221;.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"\/docs\/images\/staticline7.jpg\" alt=\"\"\/><\/figure>\n\n\n\n<p>This change will clean up the graph quite a bit, as it will not try to write the value for each customer on the line, making the graph illegible.<\/p>\n\n\n\n<p>Click &#8220;OK&#8221;.<\/p>\n\n\n\n<p>Click the &#8220;Save&#8221; icon, and then run your application.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Runtime Usage<\/h2>\n\n\n\n<p>Your output should look something like this:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"\/docs\/vue-images\/staticline8.jpg\" alt=\"\"\/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Often times when creating a Line Graph, you will have a need to create a &#8220;Goal Line&#8221; (or Reference Line) that will serve as a constant horizontal line to track if you have met a certain goal. Setting this up with a Report with Graph is very straightforward. In the&#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-1087","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\/1087","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=1087"}],"version-history":[{"count":11,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb\/1087\/revisions"}],"predecessor-version":[{"id":12374,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb\/1087\/revisions\/12374"}],"wp:attachment":[{"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/media?parent=1087"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb-category?post=1087"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb-tag?post=1087"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}