Search found 1180 matches

by Christopher
Thu Aug 22, 2019 8:11 am
Forum: .NET
Topic: Changing line series color in runtime is not working
Replies: 6
Views: 52

Re: Changing line series color in runtime is not working

bairog wrote:
Thu Aug 22, 2019 8:02 am
With your code all points are Blue (some of them should be Tomato or Gold as the corresponding lines are):
Ah, so you don't want all the Pointers to be of the same color? In which case, change the following line:

Code: Select all

 oldColor = line1.Pointer.Color = Color.Blue;
to this:

Code: Select all

oldColor = Color.Blue;
by Christopher
Thu Aug 22, 2019 7:34 am
Forum: .NET
Topic: Changing line series color in runtime is not working
Replies: 6
Views: 52

Re: Changing line series color in runtime is not working

But when I uncomment that line (where I manually change line color to Blue) - all point are Blue despite I'm setting every point color explicitly in the Add function: In this scenario there is no need to complicate matters with the series color at all, i.e. public partial class Form1 : Form { priva...
by Christopher
Wed Aug 21, 2019 3:07 pm
Forum: .NET
Topic: Changing line series color in runtime is not working
Replies: 6
Views: 52

Re: Changing line series color in runtime is not working

That's because you're adding in point colors to your series: lineActualData.Add(i, Values[i].ActualValue, Values[i].FlightDate.ToString(dateTimeMask) + " " + Values[i].FlightShift + " " + Values[i].FlightNum, lineActualData.Color); lineEquivalentData.Add(i, Values[i].EquivalentValue, Values[i].Fligh...
by Christopher
Wed Aug 21, 2019 2:50 pm
Forum: .NET
Topic: How to cast Steema.TeeChart.Chart class to Steema.TeeChart.TChart class
Replies: 1
Views: 28

Re: How to cast Steema.TeeChart.Chart class to Steema.TeeChart.TChart class

You could try using the Parent property, i.e. private void TChart1_ClickSeries(object sender, Series s, int valueIndex, MouseEventArgs e) { var tchart = sender as Chart; var parent = tchart.Parent; MessageBox.Show(parent.GetControl().Name); }
by Christopher
Tue Aug 13, 2019 10:38 am
Forum: .NET
Topic: FirstVisibleIndex and LastVisibleIndex while zooming
Replies: 18
Views: 286

Re: FirstVisibleIndex and LastVisibleIndex while zooming

Looks like it's working now, many thanks. You're welcome. Could you explain please, why that collection has more items despite of the fact that I've added _count points? The Value field is public but is for internal use. If you are uncomfortable using it, you can use the more standard API calls: Li...
by Christopher
Tue Aug 13, 2019 8:00 am
Forum: .NET
Topic: Is it possible to use TeeChart v4 Pro in WinForms application (.NET Core 3 preview)
Replies: 18
Views: 1454

Re: Is it possible to use TeeChart v4 Pro in WinForms application (.NET Core 3 preview)

bairog wrote:
Tue Aug 13, 2019 6:21 am
I'm asking because for example the ticket id=2221 has already been fixed in new build ( Steema.TeeChart.NET 4.2019.8.8) but .NET Core assemblies were not updated.
As you correctly point out, this is because the TeeChart .NET Core assemblies are still in pre-release.
by Christopher
Tue Aug 13, 2019 7:58 am
Forum: .NET
Topic: FirstVisibleIndex and LastVisibleIndex while zooming
Replies: 18
Views: 286

Re: FirstVisibleIndex and LastVisibleIndex while zooming

Hello, okay, well, another variation on an earlier technique seems to work in these circumstances, i.e. public partial class Form1 : Form { //max visible labels private const Int32 maxDisplayedLabelsForBottomaAxis = 20; List<string> _labels = new List<string>(); int _count; public Form1() { var rnd ...
by Christopher
Tue Aug 13, 2019 6:40 am
Forum: .NET
Topic: ScrollPager too long
Replies: 5
Views: 95

Re: ScrollPager too long

LebbingUser wrote:
Mon Aug 12, 2019 1:06 pm
But I got good news, I solved the problem!
That's excellent, I'm pleased to hear it!
LebbingUser wrote:
Mon Aug 12, 2019 1:06 pm
Thank you very much for your help!
If only helping other people was as simple as that :D
by Christopher
Mon Aug 12, 2019 11:41 am
Forum: .NET
Topic: FirstVisibleIndex and LastVisibleIndex while zooming
Replies: 18
Views: 286

Re: FirstVisibleIndex and LastVisibleIndex while zooming

bairog wrote:
Mon Aug 12, 2019 10:55 am
So how to deal with that? Is there a way to disable automatic thinning that is performed by chart itself?
Try setting the Labels separation to zero, e.g.

Code: Select all

            tChart1.Axes.Bottom.Labels.Separation = 0;
            tChart1.Axes.Bottom.Labels.Style = Steema.TeeChart.AxisLabelStyle.Text;
by Christopher
Mon Aug 12, 2019 9:34 am
Forum: .NET
Topic: FirstVisibleIndex and LastVisibleIndex while zooming
Replies: 18
Views: 286

Re: FirstVisibleIndex and LastVisibleIndex while zooming

And now I cannot dispose that Labels collection until my application closes. You don't have to use the Labels collection, unless you want to. I've also modded the code so scrolling doesn't draw every label when less than 20 labels are shown: public partial class Form1 : Form { //max visible labels ...
by Christopher
Mon Aug 12, 2019 8:56 am
Forum: .NET
Topic: FirstVisibleIndex and LastVisibleIndex while zooming
Replies: 18
Views: 286

Re: FirstVisibleIndex and LastVisibleIndex while zooming

How can I determine labelIndex inside DrawAxisLabel event? I've tried e.LabelValue - but it is always 0 in my case.. Well, you could check the incoming Text with the Labels collection you already have, e.g. public partial class Form1 : Form { //max visible labels private const Int32 maxDisplayedLab...
by Christopher
Mon Aug 12, 2019 8:12 am
Forum: .NET
Topic: ScrollPager too long
Replies: 5
Views: 95

Re: ScrollPager too long

But that is not my problem now. There has to be an option that extend my TChart as soon as I activate the ScrollPager. So I think I just have to check my Code and try to find the cause. Thank you very much and if you got an idea, just let me now. I'm afraid I'm still not entirely sure what your pro...
by Christopher
Mon Aug 12, 2019 8:09 am
Forum: .NET
Topic: Is it possible to use TeeChart v4 Pro in WinForms application (.NET Core 3 preview)
Replies: 18
Views: 1454

Re: Is it possible to use TeeChart v4 Pro in WinForms application (.NET Core 3 preview)

Regarding new customers and those who are going to renew their licenses - are you going to send them licenses that already support teechart.winform? Or like me they will need to contact sales@steema.com (that is too complicated to my mind)? When .NET Core 3.0 is released in September by Microsoft, ...
by Christopher
Mon Aug 12, 2019 8:05 am
Forum: .NET
Topic: FirstVisibleIndex and LastVisibleIndex while zooming
Replies: 18
Views: 286

Re: FirstVisibleIndex and LastVisibleIndex while zooming

P. S. If there is enother way to ensure two adjacent labels have a free space between them (e. g. tChart1.Axes.Bottom.Labels.Space = 10) - any help will be appreciated.. One alternative is this: public partial class Form1 : Form { //max visible labels private const Int32 maxDisplayedLabelsForBottom...
by Christopher
Fri Aug 09, 2019 12:26 pm
Forum: .NET
Topic: FirstVisibleIndex and LastVisibleIndex while zooming
Replies: 18
Views: 286

Re: FirstVisibleIndex and LastVisibleIndex while zooming

If I use BeforeDraw event - I have FirstVisibleIndex=0 and LastVisibleIndex=line1.Count after the first zoom. After the second zoom FirstVisibleIndex and LastVisibleIndex have values of the first zoom and so on. That makes impossible to calculate currently visible points inside DrawLabels function ...