Jump to content

Josep

Members
  • Content Count

    17
  • Joined

  • Last visited

Posts posted by Josep


  1. Hello,

     

    I have published in github my components to generate charts in uniGUI using de Google Charts API.

     

    The components support the following types:

     

    • Annotation
    • Area
    • Bar
    • Bubble
    • Calendar
    • Candlestick
    • Column
    • Combo
    • Diff
    • Donut
    • Gantt
    • Gauge
    • Geo
    • Histogram
    • Intervals
    • Line
    • Organization
    • Pie
    • Sankey Diagram
    • Scatter
    • Stepped Area
    • Table
    • Timeline
    • Tree Maps
    • Trendlines
    • Waterfall
    • Word Trees

     

    The library includes in demos folder the GChartsDemo project with several examples that show how to build the different class charts.

     

    When running the demo you can:

     

    • Display the Delphi Code used to generate the Chart
    • Click Google Guide button to see the official documentation of Google Charts.
    • Click on the Chart to see fired events
    •  

    You can get the source code in https://github.com/JosepPages7/Delphi-GCharts

     

     

    • Like 3
    • Thanks 1

  2. Hello,

     

    I Use a combination of TStreanWriter with TJsonTextWriter. 

    I write an array of more than 1.000.000 objects with no memory errors, during all process it uses the same 15 mb o RAM.

     

    Sample:

    procedure WriteJSONStream(const FileName: string);
    var
      StreamWriter: TStreamWriter;
    begin
      StreamWriter := TStreamWriter.Create(FileName);
      try
        WriteStream(StreamWriter);
      finally
        StreamWriter.Free;
      end;
    end;
    
    procedure WriteStream(TextWriter: TTextWriter);
    var
      ArrayBuilder: TJSONArrayBuilder;
      Writer: TJsonTextWriter;
      Obj: TJSONCollectionBuilder.TPairs;
      Arr: TJSONCollectionBuilder.TElements;
    begin
      // ExeuteQuery
      FQuery.Open;
      // --
    
      Writer := TJsonTextWriter.Create(TextWriter);
      try
        ArrayBuilder := TJSONArrayBuilder.Create(Writer);
        try
          Arr := TJSONArrayBuilder(Builder).BeginArray;
    
          while not FQuery.eof do
          begin
            Obj := Arr.BeginObject;
            with Obj do
            begin
              Add('Field1', FQueryField1.asString);
              Add('Field2', FQueryField2.asString);
              // ...
            end;
            Obj.EndObject;
    
            FQuery.Next;
          end;
          Arr.EndArray;
        finally
          ArrayBuilder.Free;
        end;
      finally
        Writer.Free;
      end;
    end;

     


  3. 3 hours ago, Uwe Raabe said:

    It would be interesting to inspect the different settings in your DEBUG and RELEASE configurations to find the real cause.

    Hi Uwe, thank you for your observation. 

     

    I maked some tests and I realised that in "Release Mode" the units that are in the "search path" of my project, are the ones that "Find Declaration" don't work, but the units included in the project or the standard units like Vcl.forms, ... then "Find Declaration" works.

×