Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/02/20 in all areas

  1. Hello everyone! A while ago I looked for a component or something that made it easy to use Highcharts in Unigui but I was unsuccessful. So I decided to develop my own component to do this. After 2 months of work is in a more stable version and decided to share with the community. I remind you that Highcharts is free for personal use only. Download from github: https://github.com/andriwsluna/Unigui-Components With this component it is possible to generate a chart with only 6 lines of code. Follow : EchoHightChart1.HighChartOptions.title.text.Value := 'Introduction'; EchoHightChart1.HighChartOptions.series.Datasource.DataSet := FDMemTable1; EchoHightChart1.HighChartOptions.series.List.FieldNameForSerie := 'Operation'; EchoHightChart1.HighChartOptions.series.List.FieldNameForX := 'month'; EchoHightChart1.HighChartOptions.series.List.FieldNameForY := 'value'; EchoHightChart1.Load; Note that there is a Datasource for data access. See demo: PM me to contribute with this project. Thanks.
    1 point
  2. Thank You! Very much appreciated, Kind Regards. Dave
    1 point
  3. Or if you are running stand alone or service than this code: procedure TUniServerModule.UniGUIServerModuleHTTPCommand( ARequestInfo: TIdHTTPRequestInfo; AResponseInfo: TIdHTTPResponseInfo; var Handled: Boolean); begin AResponseInfo.CustomHeaders.AddValue('X-Frame-Options', 'DENY'); end;
    1 point
  4. Are you running on IIS? If yes you can add it like this: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options
    1 point
  5. Sure. Thanks for sharing and replying back to me! I've spend quite some time testing and working on the memory problems. Perhaps your goal was to handle this more dynamic?, but I've instead handle it more traditional. So I've added a lot of destructers on the various objects. Also to get around the reference count problem with the ChildList:TObjectlist<THighValue> I've change it not to own its objects. So I believe all leaks now are fixed. (I don't get the memory leak dialog warning any longer.) I've also done some other small changes. One thing that I found helpful working with HighChart is to have the x-values in Highchart date format and then just format the data labels as needed function DateTimeToHighChartDateTime(d:TDateTime):int64; begin Result:=DateTimeToUnix(D) * 1000; end; I as well have a need for reloading the Graph when the user change various things. As it takes some milliseconds for the urlFrame to load the temp data-file from the web server over internet, the object flicker some then. So to get around this, I have a procedure that handle this internally within unigui. So instead setting the HTML in the UrlFrame directly. This gives a more smoother and quicker appearence. I attach the uEchoHightChart.pas - file if you're interested in reviewing any of it. Thanks for your help!
    1 point
×
×
  • Create New...