Delphi TChart Bar Offsets - delphi

By default, the biggest value in the chart will have a full bar from bottom to top.
Is there a way to get some space between the top of the diagram and the maximum value? I wanted to have a standard zoom of 90% or something like this, but zooming out any further is not possible.

Yes, this is possible using axis MaximumOffset property. For example:
Chart1.Axes.Left.MaximumOffset:=25;

As #Narcis Calvet sad one option is to use MaximumOffset but another option is to use:
Chart1.Axes.Left.Increment := 20;
I prefer to use Increments instead of MaximumOffset becouse usually it reults in nicer numerical scale on the side.
EDIT: To learn more about controlling the TChart Axis controll check this site:
http://wiki.teechart.net/index.php?title=VCLTutorial4

Related

Mirror the scale from the bottom axis to also appear in the top axis

I have a simple 0-100 range of values representing percent using HorizontalBar and the TChart (Embarcadero edition) appears on a ScrollBox in this FMX app because I don't like the panning behavior I've seen in this Delphi 10.3.3 app for Windows. But the use of the ScrollBox means that sometimes the Bottom Axis is not visible, so I would like to have its Scale repeated as the TopAxis Scale.
Just having the Visible box checked for the Scale of the TopAxis does not produce the desired result.
Currently, I have a crude work-around that uses a separate chart that only exposes its BottomAxis Scale, positioned as a TopAxis Scale in the TChart that shows the data.
Is there a way to specify having the same scale on the bottom and top of one TChart?
On the series set the general option "Horizontal Axis" to Top and Bottom and for "Vertical Axis" to Left and Right.

Highcharts - how to correctly align x-axis ticks when plotOptions.column.crisp set to false

I recently found that there is a built-in option to disable crisp for bar and column charts, which is awesome! However, I noticed that x-axis ticks slightly off (I believe ticks distance gets calculated based on crisp-true). Is there a way to align them properly?
Here are docs https://api.highcharts.com/highcharts/plotOptions.column.crisp
Updated example:
https://jsfiddle.net/bqo9dv5a/
Ideally, I want ticks to be centered for each column.
Thank you!
I found this parameter on documentation (xAxis.offset), maybe it will help achieve what you want.
API Reference: https://api.highcharts.com/highcharts/xAxis.offset
Live Demo: https://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/highcharts/yaxis/offset/

How to fix TChart Axis Margin Delphi

I was a dynamic data, and I want to show it on the same TChart. How can I fix the axis margin with different data?
For Example:
First Data Have a 'thousand' value
Second Data Have a 'hundred' value
I want my TChart have same margin for any value. Thanks in advance
I think you can set it by forcing the label width to a given value.
TChart1.Axis.Left.Labels.Size := 30;
So that it always stay at the same width.
With the interface it's here

Coreplot: Axis Labels Fixed Location

I'm trying to customize a Coreplot graph in many ways I can and the next thing I would like to do is place the X Axis Labels (one that is custom as well) at the bottom of the graph, independent of the X axis' position (whether it's scrolled up or down).
To make it clear, it is similar to giving the labels an offset value of something like 50.0. But offset is not the property I'm looking for since it fixes the labels location relative to the X axis.
Any way this can be done? Or do I have to skip the axisLabels property and place and layer or something manually at the bottom of the graph?
EDIT: Alright, I managed to place an axis on the bottom with CPTConstraints. But it's not on the bottommost. If a plot point is on those levels, the plot line overlaps the labels. I tired padding of the graph but of course, it moves the whole graph, hence the issue persists.
Thanks in advance
Make a second x-axis. Have the first one draw the axis line, tick marks, etc., as normal but no labels. Label the second one and set all of the line style properties to nil so it doesn't draw any of the lines.
Turns out that aside from the graph, the plotAreaFrame property of the CPTGrpah also has paddings. If you give more paddings to plotAreaFrame than that of the graph, the plot will be drawn in a smaller frame and the rest of the graph area will be for you to add what you want (i.e., a second Axis).
Big thanks to #Eric, for trying to answer Every single CorePlot question as soon as possible.
CorePlot does have a lot of customisation than I thought.

Highcharts gauge fill to 100% of container

This functionality is available for the Pie Chart via the plotOptions size parameter, however after inspecting the Highcharts API the size isn't available for the Gauge.
size API entry for Pie Chart
Considering the likeness of the two charts (being circular), I was hoping there would be a similar option but the gauge always fills some subset of the container div that I am unable to control. Has anyone else run into this issue or found a solution?
By setting the spacing to zero, you can fill the entire space:
http://jsfiddle.net/mkremer90/3sngK/1/
Fiddle with the spacing parameters to change how much the chart fills. As for a percentage based like size option I can't find one either.
I know this is old, but if like me, you have borderWidth set to something greater than 0, you'll find yourself with the tag being positioned (e.g. x="5.5" y="5.5") off from the corner and width and height shrunk. Setting spacing and margin options won't help in this case.
The simple solution then is to avoid setting borderWidth to anything at all; just leave it default or set it to zero. Instead, set the border on the container element you're calling highcharts on.
Alternatively, you could set negative margins and increase size on the container element to compensate for position shift and size shrink on the graph. Might need to wrap the container in a div with style="overflow: hidden;".

Resources