This topic is locked

Using AnyChart in Snippet

10/3/2022 12:33:45 PM
PHPRunner Tips and Tricks
fhumanes author

img alt
With version 10.8 of PHPRunner , the Snippet -type panels in the dashboards are improved and enhanced.

The Anychart plugin solution cannot be used in this type of panel and that is why I have made this development, so that we can use the full power of AnyChart (which is a lot and impressive).

Goal

Being able to use the full potential of AnyChart in the Snippet type panels in the version of PHPRunner 10.8, in the DashBoard improvements.

Technical solution

I wanted the solution to be much simpler than the AnyChart plugin, but to keep similarity in both the parameters and the complementary code of the chart definition, so that it can be passed from plugin to snippet, and vice versa.

DEMO: https://fhumanes.com/map_anychart/

img alt

The example made is very small. I only include a selection panel, a graphic and a thematic map. I have done it this way to make it easier to read and interpret, since the example that I did previously ( elections project ) due to its breadth is complex to study for those who are new to using Anychart. This example shares the same database as the one mentioned above, so those who are more experienced can compare the simplicity of this solution to that of using the AnyChart plugin.

The parameters reach the snippets through session variables.

Since it currently does not exist or I do not know how to refresh a “snippet” type panel, what I do, every time I change the selection of information, is to refresh the entire DashBoard page. I hope that Xlinesoft will include this functionality in the next version and if so, I will modify the example to refresh panels without having to fully reload the page.

As always, if you need any explanation, contact me through my email fernandohumanes@gmail.com

I leave you the example project so that you can download it and try it on your Windows.

admin 10/3/2022

Thank you for sharing, Fernando!

fhumanes author 1/15/2023

Using AnyChart in Snippet (Update)

DEMO: https://fhumanes.com/map_anychart/

I have been waiting to see if in the new version of PHPRunner , Xlinesoft incorporated, within the DashBoard API, the possibility of refreshing the Snippets, but in version 10.9 it does not incorporate it, nor do I know if it will incorporate it later.

Thus, I began to study how we could do it with JQUERY and it is relatively simple if we take into account some aspects such as that the first time it is called in one way and for the panel refresh by AJAX, it is called in another way. But don't worry, it's very simple and I will make a guide to explain these cases of panel refresh outside the standard functionality of PHPRunner.

The appearance of the application is the same, what improves is the refreshment of the panels when we change the data selection criteria.

The code of the new version is in the article. You can access it through this link .

fhumanes author 2/10/2023

img alt

We’re proud to announce that AnyChart has won a prestigious 2023 DEVIES Award in the Data Analytics & Visualization category! Many thanks to the jury and congratulations to all our partners and customers!

Celebrating 20 years in the market this year, we at AnyChart have been working hard to develop the best-in-class data visualization solutions. And we will keep innovating and excelling!

Access to the news

Congratulations!!!!!!!