Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Show/filter/remove top n legends
rajkishore
<p>Hi,</p>
<p> </p>
<p>I was trying to filter top n rows in chart. is there any possible solutions that can achieve?</p>
<p> </p>
<p>Due to some aggregations or data i could not able to filter the data in chart it self.So i would like to do some workaround to show only top n legends remaining should be removed. </p>
<p> </p>
<p> </p>
<p>User scenario: Report consist of chart and table. Chart should show only top n rows and whereas table should show all detail data.</p>
<p> </p>
<p>Version : iHub3</p>
<p> </p>
<p>Chart : X-axis -- Date, Y-axis-Qty, Optional Y-- IP address.</p>
<p>Show only top 10 IP's.</p>
<p> </p>
<p>Any help on this highly appreciate. </p>
<p> </p>
<p>Regards</p>
<p>Kishore G</p>
Find more posts tagged with
Comments
JFreeman
<p>You could create second table, apply the top n filter to the table, use this table as the data source for the chart and then hide the table for all outputs.</p>
rajkishore
<p>I tried that option earlier, but that was not helpful. since data is organised like that.Check the below sample that i created and now attached it.</p>
<p> </p>
<p>i would like to show all the dates with in a given range on x-axis. consider some dates might be also zero's.Those dates also i need show. </p>
<p> </p>
<p>Since some dates have zeros, if you aggregate the data in table level some dates will not fall in Top n.</p>
<p>which cause chart wont show the dates.</p>
JFreeman
<p>To be sure I am understanding, you are only wanting to show the IPs on the chart for the Top N amount and the start/end dates for the chart need to stay static based on the parameter dates set even if there is no data associated with the dates?</p>
JFreeman
<p>Take a look at the attached modified version of your report.</p>
<p> </p>
<p>Is this what you are wanting to achieve?</p>
rajkishore
<p>Thanks, Exactly this what i am looking, But after exporting it the chart is not rendering either PDF or word.Any other alternate approach?</p>
rajkishore
<p>JFreeman,Could you please suggest any alternate solution or workaround for this.</p>
JFreeman
<p>Take a look at this new version of the example.</p>
<p> </p>
<p>I have modified it so it is creating the top n list within the chart scripting which eliminates the need for a clients side window variable that was causing the PDF issue. This version should work for PDF as well as Web output.</p>
rajkishore
<p><span style="font-family:arial, helvetica, sans-serif;"><span style="font-size:14px;">Jfreeman, This looks good. But still have some limitation. I ran this report with several output formats, there might be limitation in excel.Excel is failing to render chart as it is, is this is because of the HTML5 Chart ?</span></span></p>
<p> </p>
<p><span style="font-family:arial, helvetica, sans-serif;"><span style="font-size:14px;">Why this behavior in excel different than the other formats, i know other formats convert chart to image and export it , but not in excel.</span></span></p>
<p> </p>
<p><span style="font-family:arial, helvetica, sans-serif;"><span style="font-size:14px;">User needs live charts to be exported to Excel. Exporting as image will disable interactivity functionality.</span></span></p>
<p> </p>
<p><span style="font-family:arial, helvetica, sans-serif;"><span style="font-size:14px;">Finally , Can we achieve the same format in XLSX also. </span></span></p>
<p> </p>
<p><span style="font-family:arial, helvetica, sans-serif;"><span style="font-size:14px;">Sorry for the late notice, earlier that i have mentioned PDF and word as an example of output formats.</span></span></p>
<p> </p>
<p><span style="font-family:arial, helvetica, sans-serif;"><span style="font-size:14px;"><strong>Note:</strong> Please consider, all posts(Quires) that have posted here in forum must work in all output formats.</span></span></p>
JFreeman
<p>The reason there is an issue with the chart in an excel output is because the scripting that is removing the data points is being done in the afterRendering event handler of the HTML5 chart. When exported to excel as a live excel chart it is rendering the chart in excel and not using the script to remove the data points.</p>
<p> </p>
<p>If you select to export the chart as image in the excel export options, it will show up properly because it is being rendered the same was as it would be with PDF output.</p>
<p> </p>
<p>With the way you are wanting to build the chart, I am not sure you are going to get the output you want as a live excel chart. However, I will do some more digging to see if I can figure anything else out.</p>
rajkishore
<p>Thanks JFreeman. if you have any update on live excel please let me know that solves problem.I have this kind of issue in other report also which i have working on now. This solution will resolve all my remaining reports.</p>
<p> </p>
<p>Just observed, it seems chart filter is not working properly. Enable interactivity and right click on the chart select filter and select top/bottom N. In this case also the chart x-axis(here is dates) should not change, but it should display Top/Bottom N.</p>
<p> </p>
<p>I hope this question also relevant to this thread, if not let me know will create new post.</p>
JFreeman
<p>I think your best bet on these two issues is going to be opening a support case for each of them.</p>
<p> </p>
<p>For the live excel issue, that is going to have to do with the way the emitter works when creating the chart in excel. Depending on your full requirements, it may end up being an enhancement request.</p>
<p> </p>
<p>Regarding the top/bottom N interactive filter on the chart, it looks to be that it is working as expected. That filter is going to re-render the chart with that filter applied and the filter is removing the points from the chart before it renders. This means when the chart is generated, the maximum and minimums of the axis are being created around the data points provided to the chart. This may end up needing to be an enhancement request as well to add a way to maintain the max/min of the axis when the filter is applied.</p>
rajkishore
Thanks JFreeman.