Jfree chart - XYLine chart plot huge data - jfreechart

I have a requirement to plot multiple xyline chart each with huge dataset(per second data for 7 days).
The issue is that the system consume huge memory.
Is there any way to overcome this memory issue?Can i start plotting the graph and add the data dynamically during the plotting?.
Note:This is for a webapplication using spring and the data is fetched from database.

You shold use a SamplingXYLineRenderer
From the documentation:
The renderer doesn't necessarily plot every data item - instead, it
tries to plot only those data items that make a difference to the
visual output (the other data items are skipped). This renderer is
designed for use with the XYPlot class.

Related

Datastudio Geomap Drilldown vs GoogleMap visualize issues

I was playing with DataStudio GeoMap and GoogleMap features, I used Covid US datased. I made some research what is best for showing charts via GeoMap & GoogleMap, I made report with 6 slides, each slide has Title with used method and I found below issues:
1) Drill down for GeoMap not working often, state/regions not showed,
2) in slide #2 GeoMap: used 3 Geo Dimension: Lat/Long, City, Region : how to show City names ? (and disable Latitude?)
Seems that best way is showing via GoogleMap (slide #6) with Bubble dimension :Lat/Long with Tooltip: City > then values are showing to Cities,
only issue is how to setup default zoom region US, to avoid showing whole world ?
Here is report:
https://datastudio.google.com/reporting/f0201b38-c2ae-400c-8ca0-d65d001c9e3a/page/DOdRB
One note: in My old report from today somehow I was able to create report with drill down 2-layer GeoMap, used Dimension: City+Region > not accurate, many cities are missing:
https://datastudio.google.com/u/0/reporting/a729972f-97ec-4faf-8311-a49719d0826c/page/TeaRB
Trying to import GoogleMap via embded frame, but I got this error>>
Google Maps cannot yet be displayed in embedded reports.
Question 1: Google Maps & Filters
Opened the Report above, exported the Google Maps data to Goggle Sheets, recreated a Data Source and Report, and then had a look through; it seems that the data in the City field is sorted, classifying values outside the United States as NA, in addition, removed 0,0 values in the Latitude_Longitude field, thus this Filter does the trick:
Exclude City RegExp Match (NA)
AND
Exclude Latitude_Longitude RegExp Match (0,0)
Editable Google Data Studio Report and GIF to demonstrate (Feel free to have a look through and edit the Report as required):
Question 2: Geo Maps & Drill-down
The updated Filter in Question 1 should do the trick when using the Geo Maps Chart Type, with all three Geo Types - Latitude_Longitude City and Region working as expected using the Drill-down and the Zoom area set to United States; adding an image of the Filter above for clarification:
Google Data Studio Report and a GIF to elaborate:
Question 3: Embedding Map Charts
Geo Maps can be displayed on embedded reports.
Currently, Google Maps won't appear in embedded reports.

Landing pages as a percent of total pages

(Data Studio Report - Single source of data: GAnalytics)
A website has, say:
200 pages receiving views.
66 pages receiving all entrances, all sources (Landing Pages).
In data studio, I've created scorecards for both of the above stats.
I now want to create a pie which visually expresses the KPI: "30% of pages are landing pages".
I'm relatively new to Data Studio and think I'm struggling with dimensions v metrics.
As a Scorecard...
I've been able to achieve this as a scorecard (and it was correct), so here's the solution I found:
Create a calculated field with the formula:
COUNT_DISTINCT(Landing Page) / COUNT_DISTINCT(Page)
Add this new calculated metric to a scorecard metric slot, it'll automatically chose percentage to express the result.
Note: The above is using a single data source: Google Analytics (GA).
*** I'll update re the pie chart....
(I've not achieved this with Blended Data - my next quest)

Power builder rtf column does not display simple text

I need to convert some datawindow text columns (PB 11.5.1 - SQL Server 2008R2 - datatype Text) to RTF.
I have 2 issues:
New data are displayed fine but the existing data do not display at
all
The RTF format popup has very limited height so the icons are half
displayed
For the first issue I did find a work around but it is far from elegant!
I append this:
{\rtf1\ansi\ansicpg1253\uc1\deff0{\fonttbl {\f0\fswiss\fcharset161\fprq2 Arial;} {\f1\fswiss\fcharset0\fprq2 Tahoma;} {\f2\froman\fcharset2\fprq2 Symbol;}} {\colortbl;\red0\green0\blue0;\red255\green255\blue255;} {\stylesheet{\s0\itap0\nowidctlpar\f0\fs24 [Normal];}{\*\cs10\additive Default Paragraph Font;}} {\*\generator TX_RTF32 13.0.501.502;} \deftab1134\paperw3240\paperh16838\margl0\margt0\margr0\margb0\widowctrl {\*\background{\shp{\*\shpinst\shpleft0\shptop0\shpright0\shpbottom0\shpfhdr0\shpbxmargin\shpbxignore\shpbymargin\shpbyignore\shpwr0\shpwrk0\shpfblwtxt1\shplid1025{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn fillColor}{\sv 12506623}}{\sp{\sn fFilled}{\sv 1}}{\sp{\sn lineWidth}{\sv 0}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn fBackground}{\sv 1}}{\sp{\sn fLayoutInCell}{\sv 1}}}}}\pard\itap0\nowidctlpar\plain\f1\fs20
before the text and add a } in the end.
I hope there is another way that does not include changing the actual data!
Any help appreciated
It might be a little cleaner to use the PasteRTF PowerBuilder function for existing data. Technically this doesn't solve your concern about changing data as the function probably adds the RTF tags much like you are doing manually.
As another method that might work is to try using a separate RichTextEdit control and the DataSource function. The DataSource function allows a RichTextEdit control to share data with a DataWindow and display the data in its input fields. If there are input fields in the RichTextEdit control that match the names of columns in the DataWindow, the data in the DataWindow is assigned to those input fields. I'd look at the InputFieldNamesVisible property also because it affects what is displayed.
This example from the Help File establishes the DataWindow control dw_1 as the data source for the RichTextEdit rte_1. Using a template document might be a way around your challenge of displaying data, but not actually changing it- not sure I have not used this myself.
rte_1.DataSource(dw_1)
This example inserts a document called LETTER.RTF into the RichTextEdit rte_letter (the names of the document's input fields match the columns in a DataWindow object d_emp), creates a DataStore, associates it with d_emp, and retrieves data. Then it inserts the document in rte_letter and sets up the DataStore as the data source for rte_1:
DataStore ds_empinfo
ds_empinfo = CREATE DataStore
ds_empinfo.DataObject = "d_emp"
ds_empinfo.SetTransObject(SQLCA)
ds_empinfo.Retrieve()
rte_letter.InsertDocument("LETTER.RTF", TRUE)
rte_letter.DataSource(ds_empinfo)
As far as the icon question - I am not aware of a solution for that.

RPM Newrelic metric names for browser page load time

In the Dashboard of NewRelic RPM I can see a chart named "Browser page load time".
It contains 4 values, what are the metric names for this chart ?
I got a response from their support team:
EndUser/average_app_without_queue_time
EndUser/average_network_time
EndUser/average_page_rendering_time
EndUser/RB/average_dom_content_load_time
But:
the EndUser/ endpoint didn't specify the average_app_without_queue_time metric.
the EndUser/ endpoint didn't specify the average_page_rendering_time metric.
So I miss two metrics of the above four...
I want simply fetch the data represented in the above chart in JSON format via their API.
Those two metrics, “EndUser/average_app_without_queue_time” and “EndUser/average_page_rendering_time”, and not standalone metrics like the other two, they are calculated metrics. This means that they are not going to be available directly from the API and that instead you will need to pull down their constituent parts and perform the calculation. Here are the two formulas:
average_app_without_queue_time = ("EndUser".total_app_time - "EndUser/RB".total_queue_time) / "EndUser".call_count
and
average_page_rendering_time = "EndUser".average_fe_response_time - "EndUser/RB".average_dom_content_load_time

Is there a way I can Pass xml ,start,limit in store.load?

Im new to extjs,I need to pass a xml(xml data thats loading grid),and start value,and limit.How can I do this in 'store.load'???
I actually need to display data in grid,with current pagenumber,and with limit.
Is there a way???plz help
You just need to setup a page size and then use store.loadPage() method.
Bear in mind there is a nice paging toolbar for data grid integrated in ExtJS

Resources