0

Organisation umfangreiches echart-Dashboard / -galerie

Ich möchte in ninox eine umfangreiche echarts-Chartgalerie mit ca. 150 Charts erstellen und stelle mir gerade die Frage, wie ich das am besten strukturell umsetze.  Bisher verwende ich FX-Felder, um die einzelnen Charts darzustellen. Das funktioniert auch soweit ganz gut. Das Problem ist die Performance, die auf der betreffenden Seite bei vielen FX-Elementen die Zugriffszeiten massiv verlangsamt.

Ich hatte mir die Lösung so vorgestellt, dass ich für jeden einzelnen Chart in einer Charttabelle einen Datensatz anlege der die Beschreibung und die Konfiguration für den echart-Aufruf enthält. Da ich häufig mit select-Abfragen arbeite, funktioniert die Ausführung in normalen Textfeldern bzw. RTF-Feldern soweit ich weis aber nicht. Dies hätte zur Folge, dass ich für jeden Chart ein einzelnes FX-Feld anlegen müsste, welches dann wieder zu Performanceproblemen führt. 

Mein Traumszenario wäre eine Tabelle die alle Datensätze mit der Chartkonfiguration und der Selectabfrage enthält und ein Dashboard in dem ich die jeweiligen Tabellen auswähle, die ich anzeigen möchte.

In einer Testdatenbank habe ich dies mit einer Switch-case-Struktur hinbekommen, aber leider muss ich dann immer in dem einzelnen FX-Feld des Dashboards den Code erweitern, wenn ein neues Diagramm hinzukommt. Die Performance bei dieser Lösung ist zwar sehr gut, da alle Abfrageparameter in einem FX-Feld gespeichert sind (und ich mit Abfrageparametern arbeite kann), leider ist die Verwaltung und Erweiterung nicht optimal.

Wie habt ihr das umgesetzt? Für Ideen bzw. Erfahrungswerte bin ich dankbar.

Frank

6 Antworten

null
    • Fred
    • vor 5 Tagen
    • Gemeldet - anzeigen

    Can you post a sample DB with no personal information? Also post a couple of datasets that you will need for your charts.

      • Pro BoutiquenFonds GmbH
      • Eichelfr
      • gestern
      • Gemeldet - anzeigen

       Hi Fred, thank you for your interest in the discussion. I attached a test DB with 3 examples how to handle echarts graphs in ninox. The first example use separate fx-field for every different chart. That has the disadvantage that you get in performance trouble, when you work with large tables and you can‘t use variables for the different charts. The second example (switch case) is better, because you can use variables but when you work with many charts, the script handling ist not very user friendly. The third case is the best solution, but I don‘t know if that work (use the chartscript from a text field in a separate table to execute it in an fx-field). But possibly are other ways how to organize numerous charts? I hope that helps and make the case a bit clearer.  Frank 

      • Fred
      • gestern
      • Gemeldet - anzeigen

      wow, 300K+ records. Are you working in the public cloud or in the Mac App?

      • Pro BoutiquenFonds GmbH
      • Eichelfr
      • vor 22 Stunden
      • Gemeldet - anzeigen

       enterprise Version in the Public Private cloud.

    • Fred
    • vor 23 Stunden
    • Gemeldet - anzeigen

    I've uploaded one way of dealing with such a large DB.

    Open the Dashboard table first and see how fast the charts load.

    Since your raw data is so large (over 300K), you need to figure out a way to stop using it as it takes Ninox so long to manage it.

    So you will see that I created a new table called Summary. You will see that I created a record for each console and genre. This can be expanded to include anything you want.

    I created a formula field that figures sums the total_sales for each console and genre. I called this field "lTotalSales" the l stands for live. I then created a number field called TotalSales. Then I copy the value from lTotalSales into TotalSales.

    Back to the Dashboard, I now reference the Summary table and its 93 records. I then filter by ChartGroup and then reference the number field TotalSales and things move so much faster. Ninox no longer has to to anything with the huge table.

    There is a button in the Dashboard page that is supposed to update the data in the Summary table, but it also takes a long time to finish, so there needs to be more thought into making that move faster.

    I have some thoughts, so I'll post again if I find anything that works.

    • Pro BoutiquenFonds GmbH
    • Eichelfr
    • vor 3 Stunden
    • Gemeldet - anzeigen

    Hi Fed, thank you for your support! In my real life db I also work with pre-calculated results. But when you plan to work with a lot of charts, with a lot of single selects, the performance of the db will be affected in a bad way. A possible solution to increase the performance could be to store a selects of the chart-data in one single fx-field and combine the echart configuration information with the chart data, but I have no clue how to do this. Possibly are other guys in the forum with intersting ideas? Frank