Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Apexchart
Apexchart [message #1842496] Mon, 21 June 2021 17:40 Go to next message
Dmitry Dukhov is currently offline Dmitry DukhovFriend
Messages: 192
Registered: February 2013
Senior Member
Hi
I tried to integrate Apexchart inside RAP.
Now it looks so
if anyone is interested, I can post it to the public
Project is small, without comments. and js files is magic for me till now
Dmitry
        ApexLine chart = new ApexLine(parent, "line_stg");

        LocalDateTime from = ShopRwt.getLocalDateMin(dateFrom).minusHours(1);
        LocalDateTime till = ShopRwt.getLocalDateMax(dateTill).plusHours(25);

        TResult rs = domain.equalsIgnoreCase("any") ? Global.appDB.getStatOccAll(objServer.getInt("ID"), MyShop.getEpochTime(from), MyShop.getEpochTime(till)) : Global.appDB.getStatOccDomain(objServer.getInt("ID"), domain, MyShop.getEpochTime(from), MyShop.getEpochTime(till));
        LinkedHashMap<Long, Double> series = new LinkedHashMap<>();
        for (TObject obj : rs) {
            try {
                series.put(obj.getEpochTime("SERVERTIME"), obj.getDouble("REPORTING_MB", 2) * 1024 * 1024); /
            } catch (DateTimeParseException ignored) {
            }
        }
        chart.getJson().addTimeSeries(domain, series);
        chart.getJson().setTitle("Domain: " + domain, "center");
        chart.show();


[Updated on: Mon, 21 June 2021 17:41]

Report message to a moderator

Re: Apexchart [message #1842657 is a reply to message #1842496] Sun, 27 June 2021 12:03 Go to previous message
Dmitry Dukhov is currently offline Dmitry DukhovFriend
Messages: 192
Registered: February 2013
Senior Member
online
select Statistic/Config item
https://159.69.216.78:5020/start
Previous Topic:Access ui thread from servlet.
Next Topic:How to deploy RAP. Is there an up to date description available
Goto Forum:
  


Current Time: Thu Jun 13 23:38:13 GMT 2024

Powered by FUDForum. Page generated in 0.02805 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top