Teechart + logarithm Scale - activex

If I change the Left Axis Scale to Log 10. It should start with 1 instead of Zero. If I do it manually also say I say Min as 1, Max as 1000 and Incr =100 then it doesn't show me the starting point (i.e 1). It shows all the points except that.
Max Position on Y axis is Not shown
Thanks
Akshay

Code below works fine for me with TeeChart Pro ActiveX 2013
TChart1.Aspect.View3D = False
TChart1.AddSeries scLine
TChart1.Axis.Left.Logarithmic = True
TChart1.Axis.Left.LogarithmicBase = 10
For i = 0 To 1000
TChart1.Series(0).Add i, "", clTeeColor
Next
Does it work fine for you? Which TeeChart version are you using?

Related

highcharts 7 issue with negative ticks

Highcharts upgrade from version 5 to version 7 is causing negative ticks on x and y axes even when no negative data exists. Various chart plots are wrongly displaying negative axes. Instead the expectation is that the axes must start at 0 (min: 0 is given) and must plot only the positive ticks (tickAmount: 5 is given).
This worked perfectly with version 5 but is behaving weird with version 7.
The left picture is version 7 chart. Look at the starting tick, -2.5, whereas there are no negative values, so it must start at 0. Also observe the last tick is not appropriate width as the other tick intervals and ends abruptly in between.
Here is the link for demonstration of the issue: https://jsfiddle.net/3awvyn0b/3/, see config for x-axis which is not being reflected in the plot:
xAxis: {
tickAmount: 5,
min: 0
},
If I remove tickAmount for the x-axis, the negative ticks are resolved but then the ticks are not correctly marked.
What has changed in version 7 that I need to handle?
Since this is a regression issue (bug report here: github.com/highcharts/highcharts/issues/13749#issue-641882231), the suggested workaround for now is to either
use even number of ticks on the chart. So instead of using tickAmount: 5 I'm now using tickAmount: 6 and that has resolved the negative ticks issue.
or along with the tickAmount (either odd or even tick number, as the need maybe) set endOnTick: true for the xAxis

How to set the label count for X axis in LineChartView?

In my data, I have hundreds of values for the x-axis, but I want to show only 6 or 7 of them at equal intervals so that my whole range of x-axis values are covered, but I am facing an issue as I am not able to show a limited number of values on the x-axis . I tried these
lineChartView.xAxis.spaceMin = 4
lineChartView.xAxis.spaceMax = 7
lineChartView.xAxis.xOffset = 6
lineChartView.xAxis.labelCount = 6
, but it is not working .Here is my screenshot for the display
The axis property granularity is used to specify the minimum interval between axis values. The default value is 1. Currently in my app i have it set to 0.5 to force all values to be displayed, but I only have 10 or so on the chart at once.
chartView.xAxis.granularity = 0.5
Perhaps setting this to a higher value will help you.

Want to set label value on TeeChart InnerTick VC++

I wanted to set label text value on TeeChart InnerTick using VC++. like we have below example (I wanted to set AAAA,BBBB,CCCC,DDDD values).
// Sorry i was not able to attach image.
Below mention chart we have created using CGraph. to get co-ordinates we are using SDKInfo property. i wanted to know that how can we get all these x axis,y axis values using TeeChart. Is there any API to get these co ordinates ?
1
X axis max (your data units)
2
X axis min (your data units)
3
Y axis max (your data units)
4
Y axis min (your data units)
5
X axis length (Graphics Server view units)
6
Y axis length (Graphics Server view units)
7
X origin (Graphics Server view units)
8
Y origin (Graphics Server view units)
9
Label font size (percentage of system font)
|
|
| AAAA BBBB CCC DDDD
|__________|____________________|___________________|__________________|________
| | | |
111 222 333 444
Thanks,
I'm not sure about what exact TeeChart version are you using so this answer may be a bit vague.
All binary installations of TeeChart come with a program we call "Features Demo". This program includes examples showing how to use the majority of features supported.
One of the examples is the "Custom Labels", you should find it under "All Features\Welcome !\Axes\Labels\Custom Labels" in the program.
Also, to convert axis values to screen pixels, all TeeChart versions provide "Calc*" functions for it. Ie, to convert the value 10 in the bottom axis to pixels, in TeeChart ActiveX:
XPix = tChart1.Axis.Bottom.CalcXPosValue(10);
Just note these functions need the chart to be drawn once so the internal properties have been initialized and the calculations can be correctly done.

Teechart + Multiple Box Plots

I need to plot around 80 Box Plot in Single chart, I have created 80Series with 7 Point eachs, The Issue is the Box plot are plotted properly since I am using Position but the problem is on X axis I am getting only 7 points labels I want that for all the 80 Box Plot.
I have made a simple code that I think you can use to achieve as you want:
Private Sub Form_Load()
TChart1.Aspect.View3D = False
TChart1.Legend.Visible = False
Dim i As Integer
For i = 0 To 80
TChart1.AddSeries scBox
TChart1.Series(i).FillSampleValues 7
TChart1.Series(i).asBoxPlot.Position = i + 10
Next
TChart1.Axis.Bottom.Labels.Style = talValue
TChart1.Axis.Bottom.Labels.Angle = 90
End Sub
Could you tell us if previous code help you? If it doesn't help please, tell us exactly what you want, so, we will try to give you, a good solution.
Thanks,

TChart - Dont plot values that are less than 0?

Introduction
I am using the TChart component and am finding the options rather confusing and hard to find what I need.
The Left Axis of the chart has a minimum of 0 and a maximum of 5000, the Bottom Axis has a minimum of 0 and a maximum of 52 (weeks in a year).
In my chart I have 2 series that are populated based on values from a record I have created which can be edited at runtime, everything is working good so far.
Problem
Take a look at the below image of part of the chart filled with some random values:
I am not sure if such an option exists or not, but notice from week 4 onwards where no values have been added there is a solid red line.
I don't want the chart to plot values that are less than 0, so in this example from week 4 onwards there should be no more lines (I can confirm that from week 4 onwards I have the values set at -1)
Week 1 to 4 does not show this bottom red line, obviously because the values are greater than 0 and are therefore plotted above the line, but this should make my problem a bit more clearer.
So, how do I prevent the chart from plotting / drawing values that are less than 0, importantly for the Bottom Axis of the chart?
I am sure there must be a simple option somewhere, I just cannot find it if there is one as I am not too familiar with the TChart Component.
You have the possibility when adding values to a series to add them as null.
This will prevent them from showing.
Ken is correct saying that a tricky situation is to handle a single value surrounded by null values.
Picking another series type than FastLine and show dots as well as lines might work better.
For a FastLine series to show gaps, set:
Series1.IgnoreNulls := False;
And to discriminate values below zero:
if (y < 0) then
Series1.AddNullXY(x, y, '')
else
Series1.AddXY(x, y, '');
if y < 0 then
LineSeries1.AddXY(x, y, '', clNone)
else
LineSeries1.AddXY(x, y, '', clRed);

Resources