{"id":4303,"date":"2016-12-22T16:57:39","date_gmt":"2016-12-22T08:57:39","guid":{"rendered":"http:\/\/www.finereport.com\/en\/?p=4303"},"modified":"2020-11-27T13:55:24","modified_gmt":"2020-11-27T05:55:24","slug":"how-to-make-a-column-chart-with-negative-values","status":"publish","type":"post","link":"https:\/\/www.finereport.com\/en\/product-functions\/how-to-make-a-column-chart-with-negative-values.html","title":{"rendered":"How to make a column chart with negative values?"},"content":{"rendered":"<div class=\"hdwiki_tmml\"><strong><span lang=\"EN-US\">1. Problem description<\/span><\/strong><\/div>\n<div class=\"doc_description\"><span lang=\"EN-US\">When data contains negative values, we need a corresponding part in the chart to plot the negative values. Though negative values are available in V6.5.5, it is impossible to definitely take Graduation 0 as the boundary. This version further optimizes this function and the effect is as follows:<\/span><\/div>\n<div class=\"doc_description\">\n<div class=\"hdwiki_tmml\"><strong><span lang=\"EN-US\">2. Example<\/span><\/strong><\/div>\n<\/div>\n<div class=\"doc_h2\">\n<div class=\"hdwiki_tmmll\"><strong><span lang=\"EN-US\">2.1 Prepare data<\/span><\/strong><\/div>\n<\/div>\n<div class=\"doc_description\"><span lang=\"EN-US\"><span lang=\"EN-US\">Create a new workbook in <a title=\"FineReport BI and reporting tool report designer\" href=\"http:\/\/www.finereport.com\/en\/features\/report-designer\" target=\"_blank\" rel=\"noopener noreferrer\">report designer<\/a> and add a dataset with SQL statement of <\/span><b><span lang=\"EN-US\">SELECT product name, sales volume, (ordering amount + re-ordering amount) as total ordering amount FROM [product] where category ID = 1&nbsp;<\/span><\/b><span lang=\"EN-US\">to query inventory and total ordering amount of drink products.<\/span><\/span><\/div>\n<div class=\"doc_description\"><span lang=\"EN-US\">As shown below, create a report with the&nbsp;<a title=\"FineReport reporting and business intelligence tool\" href=\"\/en\/\" target=\"_blank\" rel=\"noopener noreferrer\">business intelligence tool<\/a> to calculate inventory and total ordering amount of each product, and calculate the remaining inventory; if the difference is a negative value, supplementary is required; use such data as the chart data to create a statistic chart with the <a title=\"FineReport BI and reporting tool\" href=\"\/en\/\" target=\"_blank\" rel=\"noopener noreferrer\">reporting tool<\/a>, which intuitively show the products to be supplemented:<\/span><\/div>\n<div class=\"doc_description\"><\/div>\n<div class=\"doc_h2\">\n<div class=\"hdwiki_tmmll\"><strong><span lang=\"EN-US\">2.2 Design of column chart with negative values<\/span><\/strong><\/div>\n<\/div>\n<div class=\"doc_description\"><span lang=\"EN-US\">In <a title=\"FineReport data analysis\" href=\"\/en\/help\/data-analysis\" target=\"_blank\" rel=\"noopener noreferrer\">data analysis<\/a>, common column charts support negative values. Taking Float Chart as an example, click <\/span><b><span lang=\"EN-US\">Insert &gt; Float Element &gt; Insert Chart <\/span><\/b><span lang=\"EN-US\">in the menu bar to pop up the Chart Wizard dialog. Select Column Chart and click OK. Set chart data source as follows:<\/span><\/div>\n<div class=\"doc_description\"><\/div>\n<div class=\"doc_h2\">\n<div class=\"hdwiki_tmmll\"><strong>2.3 <span lang=\"EN-US\">Save and preview<\/span><\/strong><\/div>\n<\/div>\n<div class=\"doc_description\"><span lang=\"EN-US\">Save template. Click Page-breaking Preview and the effect is as shown below.&nbsp;<\/span><\/div>\n<div class=\"doc_description\">\n<p><span lang=\"EN-US\"><span lang=\"EN-US\"><span lang=\"EN-US\"><span style=\"color: #000000;\"><\/span><\/span><\/span><\/span><\/p>\n<p>&nbsp;<\/p>\n<\/div>\n<div class=\"doc_description\">For completed templates, see:<span class=\"doc_dir\"><span style=\"color: #0000ff;\"><b>%FR_HOME%\\WebReport\\WEB-INF\\reportlets\\doc\\Advanced\\Chart\\Negative.cpt.<\/b><\/span><\/span><\/div>\n","protected":false},"excerpt":{"rendered":"<p>1. Problem description When data contains negative values, we need a corresponding part in the chart to plot the negative values. Though negative values are available in V6.5.5, it is impossible to definitely take Graduation 0 as the boundary. This version further optimizes this function and the effect is as follows: 2. Example 2.1 Prepare&#8230;<\/p>\n","protected":false},"author":1,"featured_media":11187,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[111],"tags":[126,117],"yst_prominent_words":[1545,569,3508,1035,1675,1130,185,1664,6108,6105,6102,6100,6106,6103,6107,2387,4302,6104,6101,617],"_links":{"self":[{"href":"https:\/\/www.finereport.com\/en\/wp-json\/wp\/v2\/posts\/4303"}],"collection":[{"href":"https:\/\/www.finereport.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.finereport.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.finereport.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.finereport.com\/en\/wp-json\/wp\/v2\/comments?post=4303"}],"version-history":[{"count":6,"href":"https:\/\/www.finereport.com\/en\/wp-json\/wp\/v2\/posts\/4303\/revisions"}],"predecessor-version":[{"id":11188,"href":"https:\/\/www.finereport.com\/en\/wp-json\/wp\/v2\/posts\/4303\/revisions\/11188"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.finereport.com\/en\/wp-json\/wp\/v2\/media\/11187"}],"wp:attachment":[{"href":"https:\/\/www.finereport.com\/en\/wp-json\/wp\/v2\/media?parent=4303"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.finereport.com\/en\/wp-json\/wp\/v2\/categories?post=4303"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.finereport.com\/en\/wp-json\/wp\/v2\/tags?post=4303"},{"taxonomy":"yst_prominent_words","embeddable":true,"href":"https:\/\/www.finereport.com\/en\/wp-json\/wp\/v2\/yst_prominent_words?post=4303"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}