tachart lazarus / 55-TAChart ---------------------------------------------------------------------- metallaro1980 · 2019-09-05 09:59 there is a way to enlarge x scale? i have a tachart where i plot the results of the transient analysis. when the vin (pulse generator) has a high frequency the signal plotted on the tachart is very compacted. there is a way to increase x scale in order to have a plot more opened (for ex: 1us of interval -> will be a double length of original size on x axis )? thank you very much ---------------------------------------------------------------------- wp · 2019-09-05 10:28 Zooming? Drag a rectangle with the left mouse button held down from the upper left to the lower right corner of the rectangle that you want to enlarge, and you will expand the scale accordingly. Clicking into the chart restores the original viewport. You may want to have a look at the zooming chapter in the tutorial htt ps://wiki.lazarus.freepascal.org/TAChart_Tutorial:_ColorMapSeries,_Zoo ming. In code, you can zoom around a certain region of your chart using the LogicalExtent. This is a TDoubleRect record of two TDoublePoint recorda, a and b. a is the lower left corner, b the upper right corner of the range visible in the chart. Assigning new values expands the chart accordingly Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i uses  TAChartUtils;  // for TDoubleRect; procedure TForm1.ZoomChart(NewXMin, NewXMax: Double);var  ext: TDoubleRect;begin  ext := Chart1.LogicalExtent;  ext.a.X := NewXMin;  ext.b.X := NewXMax;  Chart1.LogicalExtent := ext;end; ---------------------------------------------------------------------- metallaro1980 · 2019-09-05 11:24 Quote from: wp on September 05, 2019, 12:28:08 pmZooming? Drag a rectangle with the left mouse button held down from the upper left to the lower right corner of the rectangle that you want to enlarge, and you will expand the scale accordingly. Clicking into the chart restores the original viewport. You may want to have a look at the zooming chapter in the tutorial htt ps://wiki.lazarus.freepascal.org/TAChart_Tutorial:_ColorMapSeries,_Zoo ming. In code, you can zoom around a certain region of your chart using the LogicalExtent. This is a TDoubleRect record of two TDoublePoint recorda, a and b. a is the lower left corner, b the upper right corner of the range visible in the chart. Assigning new values expands the chart accordingly Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i uses  TAChartUtils;  // for TDoubleRect; procedure TForm1.ZoomChart(NewXMin, NewXMax: Double);var  ext: TDoubleRect;begin  ext := Chart1.LogicalExtent;  ext.a.X := NewXMin;  ext.b.X := NewXMax;  Chart1.LogicalExtent := ext;end; not zooming like an oscilloscope ... you can set the x/us of intervals time ---------------------------------------------------------------------- wp · 2019-09-05 11:53 What is the total time range between first and last data point? And how many data are to be displayed? ---------------------------------------------------------------------- metallaro1980 · 2019-09-05 16:04 Quote from: wp on September 05, 2019, 01:53:55 pmWhat is the total time range between first and last data point? And how many data are to be displayed? normally the transient start from 0 to 5ms with 25us of time step it uses the frequency of a pulse generator so 1khz for a sine wave or others parameters for a pulse wave the ac analysis is used for example for bode diagram (you must use for example vout in frequency domain (x axis)..magnitude in db y axis) ---------------------------------------------------------------------- wp · 2019-09-05 17:08 I still don't understand why this is not zooming. Please post a screenshot of what TAChart is outputting and of what you expect to see. If you have a measurement file please post it too (provided that it is easily readable). ---------------------------------------------------------------------- metallaro1980 · 2019-09-05 18:42 Quote from: wp on September 05, 2019, 07:08:03 pmI still don't understand why this is not zooming. Please post a screenshot of what TAChart is outputting and of what you expect to see. If you have a measurement file please post it too (provided that it is easily readable). i must have an enlarged plot with maybe scrollbar (horiz) where for example instead of one interval (the x space from  0us to maybe 25us) 2 intervals..so from 0us to 12.5us one interval from 12.5us to 25us another one interval. all this until 5ms ---------------------------------------------------------------------- wp · 2019-09-05 20:59 OK - I think I got the point now. Please study the attached demo. It uses some demo data similar to your screenshot and adds a scrollbar which is adjusted such that only a 12.5 us wide window of the entire data set covering 5 ms is visible. Using the scrollbar the window can be advanced in steps of 12.5 us over the chart. Just for curiosity I added an option to activate other time windows, 25 us and 50 us. I don't give a deeper explanation here - just see the demo sources, there are lots of comments to explain why I did this and that. ---------------------------------------------------------------------- metallaro1980 · 2019-09-06 10:53 Quote from: wp on September 05, 2019, 10:59:31 pmOK - I think I got the point now. Please study the attached demo. It uses some demo data similar to your screenshot and adds a scrollbar which is adjusted such that only a 12.5 us wide window of the entire data set covering 5 ms is visible. Using the scrollbar the window can be advanced in steps of 12.5 us over the chart. Just for curiosity I added an option to activate other time windows, 25 us and 50 us. I don't give a deeper explanation here - just see the demo sources, there are lots of comments to explain why I did this and that. ok thank you very much ! i've done it !