Jump to content

Recommended Posts

Posted

I got confused here, there are two posts,
one about errors in the console, another about css/js files that are not cached,
they are always fetched from the server.

  • 1 year later...
Posted
4 hours ago, Sherzod said:

Hello,

Which chart?

Hi Sherzod,

I mean, how to save any chart in the TuniGChartsFrame.

We could print the chart with uniGChartsFrame.DocumentPrint. Maybe we could save the chart as PNG or JPG file with something like that?

  • Like 1
  • 2 months later...
Posted

@Pep Thank you - This looks as if it will help me with some very neat charts. Much appreciated.

I am using Delphi 12.2. To get your component to install, I modified the requires clause of the Alexandria project, adjusting to uniGUI29, uIndi29 and unitTools29.

This works fine for Windows 32-bit projects, but I cannot compile for Windows 64-bit (or Windows 64-bit (Modern))

Could you please advise, or are you able to update the repository?

Many thanks!

  • 6 months later...
Posted

Gostaria de parabenizá-lo pelo excelente componente para a criação de gráficos visuais.
Preciso criar um mapa do Brasil com os estados, como:

  • Amazonas, Acre, Minas Gerais, Pernambuco, São Paulo, Rio de Janeiro, etc.

Adicionei as linhas abaixo ao meu modelo, mas ele exibe apenas o mapa do Brasil como um todo, sem mostrar os dados do estado.

 

  Chart.Options.Region('BR');

  Chart.Data.AddRow(['BR-AC', 200]);
  Chart.Data.AddRow(['BR-MG', 300]);
  Chart.Data.AddRow(['BR-AM', 400]);

 

É possível gerar esse tipo de gráfico usando esse componente?

Obrigado pela sua atenção.

Delphi versão 10.3
Versão Unigui: 1.90.0 build 1549

 

 

Posted

Team, I've researched it and would like to share the solution to the problem.

<div class="col-md-7 col-sm-12">
    <div id="geochart-colors">

    </div>
</div>
    
    <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>

    <script>
        google.load('visualization', '1', { 'packages': ['geochart'] });
        google.setOnLoadCallback(drawVisualization);

        function drawVisualization() {
            var data = google.visualization.arrayToDataTable([
                ['State', 'City', 'Autorizadas'],
                ['BR-AC', 'Acre', 100.99],
                ['BR-AL', 'Alagoas', 20.21],
                ['BR-AM', 'Amazonas', 30.35],
                ['BR-AP', 'Amapá', 40.90],
                ['BR-BA', 'Bahia', 50.55]
            ]);

            var options = {
                region: 'BR',
                // displayMode: 'regions',
                resolution: 'provinces',
                datalessRegionColor: 'transparent',
                forceIFrame: false,
                colorAxis: '#f75192',
                backgroundColor: 'transparent',
                defaultColor: '#f75192',
                enableRegionInteractivity: true,
                tooltip: {
                    isHtml: true
                }
            };

            var chart = new google.visualization.GeoChart(document.getElementById('geochart-colors'));
            chart.draw(data, options);

        };

    </script>

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...