TeeChart5 in Visual Studio 2010
TeeChart5 in Visual Studio 2010
Hi,
I have another problem/question. I installed TeeChartNET2012Src_4.1.2012.01310 and selected Visual Studio 2010. Am using Visual Studio 2012, in fact. I have 2 projects referencing TeeChart, one with no GUI and one with GUI. I set the references and then modified the project so it can reference the correct version depending on the Platform Target, x86 or AnyCPU (that would be 64 bit):
<Reference Include="TeeChart" Condition="$(Platform) == 'AnyCPU'">
<HintPath>..\..\..\..\Program Files (x86)\Steema Software\Steema TeeChart for .NET 2012 4.1.2012.01310\net40\x64\TeeChart.dll</HintPath>
</Reference>
<Reference Include="TeeChart" Condition="$(Platform) == 'x86'">
<HintPath>..\..\..\..\Program Files (x86)\Steema Software\Steema TeeChart for .NET 2012 4.1.2012.01310\net40\x86\TeeChart.dll</HintPath>
</Reference>
When I build the solution for x86, it builds and works fine, however, when I build it for AnyCPU the non-GUI project builds fine but the GUI one, which has Steema.TeeChart.TChart controls on several forms, gives me the following error when trying to build: Error 27 'Could not load file or assembly 'TeeChart, Version=4.1.2012.1312, Culture=neutral, PublicKeyToken=9c8126276c77bdb7' or one of its dependencies. An attempt was made to load a program with an incorrect format.'
When I put the TChart controls on the forms the references were to the x86 version. The question here is, is there any way of having the TChart control on the forms and build the project with a Platform Target of x86 or AnyCPU (64 bit) depending on my choosing without having to manually remove the TChart controls from and then and re-add them?
Thank you
I have another problem/question. I installed TeeChartNET2012Src_4.1.2012.01310 and selected Visual Studio 2010. Am using Visual Studio 2012, in fact. I have 2 projects referencing TeeChart, one with no GUI and one with GUI. I set the references and then modified the project so it can reference the correct version depending on the Platform Target, x86 or AnyCPU (that would be 64 bit):
<Reference Include="TeeChart" Condition="$(Platform) == 'AnyCPU'">
<HintPath>..\..\..\..\Program Files (x86)\Steema Software\Steema TeeChart for .NET 2012 4.1.2012.01310\net40\x64\TeeChart.dll</HintPath>
</Reference>
<Reference Include="TeeChart" Condition="$(Platform) == 'x86'">
<HintPath>..\..\..\..\Program Files (x86)\Steema Software\Steema TeeChart for .NET 2012 4.1.2012.01310\net40\x86\TeeChart.dll</HintPath>
</Reference>
When I build the solution for x86, it builds and works fine, however, when I build it for AnyCPU the non-GUI project builds fine but the GUI one, which has Steema.TeeChart.TChart controls on several forms, gives me the following error when trying to build: Error 27 'Could not load file or assembly 'TeeChart, Version=4.1.2012.1312, Culture=neutral, PublicKeyToken=9c8126276c77bdb7' or one of its dependencies. An attempt was made to load a program with an incorrect format.'
When I put the TChart controls on the forms the references were to the x86 version. The question here is, is there any way of having the TChart control on the forms and build the project with a Platform Target of x86 or AnyCPU (64 bit) depending on my choosing without having to manually remove the TChart controls from and then and re-add them?
Thank you
Re: TeeChart5 in Visual Studio 2010
Hello Transched,
First, I communicate you that I have split your message of the original message and I have moved it to.Net Forums, because you wrote a question in a thread that isn't related by your message.
Notice that x64 assembly is a runtime only assembly. This means you won't be able to use at designtime. You can do your development with the x86 version and build your applications with the x64 assembly for deployment. I recommend you taking a look in next threads to see the explanations and suggested solutions to work in correct way with x64.
http://www.teechart.net/support/viewtop ... its#p45066
http://www.teechart.net/support/viewtop ... x64#p59151
Thanks,
First, I communicate you that I have split your message of the original message and I have moved it to.Net Forums, because you wrote a question in a thread that isn't related by your message.
Notice that x64 assembly is a runtime only assembly. This means you won't be able to use at designtime. You can do your development with the x86 version and build your applications with the x64 assembly for deployment. I recommend you taking a look in next threads to see the explanations and suggested solutions to work in correct way with x64.
http://www.teechart.net/support/viewtop ... its#p45066
http://www.teechart.net/support/viewtop ... x64#p59151
Thanks,
Best Regards,
Sandra Pazos / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: TeeChart5 in Visual Studio 2010
Hi,
I have the following problem: I'm using the .NET version of TeeChart in Visual Studio 2012, having a TChart control on a form, chart that displays series of elements. The problem is that when I click on one of the elements the MouseUp event is not being triggered (MouseDown is always, which is good). On the MouseDown I'm setting some variables so I know it enters in dragging mode, so I can select more elements at once until the mouse button is up, but because the MouseUp is not triggered it's always in "dragging" mode. There's no such problem in the ActiveX version of the TeeChart, where it's also drawing a rectangle while dragging, rectangle that is not being drawn in the .NET version (this is less important than the MouseUp not being triggered).
Thank you.
I have the following problem: I'm using the .NET version of TeeChart in Visual Studio 2012, having a TChart control on a form, chart that displays series of elements. The problem is that when I click on one of the elements the MouseUp event is not being triggered (MouseDown is always, which is good). On the MouseDown I'm setting some variables so I know it enters in dragging mode, so I can select more elements at once until the mouse button is up, but because the MouseUp is not triggered it's always in "dragging" mode. There's no such problem in the ActiveX version of the TeeChart, where it's also drawing a rectangle while dragging, rectangle that is not being drawn in the .NET version (this is less important than the MouseUp not being triggered).
Thank you.
Re: TeeChart5 in Visual Studio 2010
Hi,
I'm also having another problem: I'm using the .NET version of TeeChart in Visual Studio 2012, having a TChart control on a form, chart that displays series of elements. On a form I have a grid where each row corresponds to one of the displayed elements on the chart. When I select one or more rows in the grid it's supposed to be selecting the corresponding elements on the chart. In the ActiveX version of the chart it works fine, all of the corresponding elements in the chart get selected. However, in the .NET version they don't get selected. And here is the strange part: in the .NET version, after selecting something in the grid and not seeing the corresponding elements on the chart being selected, I click any one of the icons in the taskbar (icons corresponding to programs already running, like my application or some other program) and then the elements on the chart that should have been highlighted get highlighted.
Thank you
I'm also having another problem: I'm using the .NET version of TeeChart in Visual Studio 2012, having a TChart control on a form, chart that displays series of elements. On a form I have a grid where each row corresponds to one of the displayed elements on the chart. When I select one or more rows in the grid it's supposed to be selecting the corresponding elements on the chart. In the ActiveX version of the chart it works fine, all of the corresponding elements in the chart get selected. However, in the .NET version they don't get selected. And here is the strange part: in the .NET version, after selecting something in the grid and not seeing the corresponding elements on the chart being selected, I click any one of the icons in the taskbar (icons corresponding to programs already running, like my application or some other program) and then the elements on the chart that should have been highlighted get highlighted.
Thank you
Re: TeeChart5 in Visual Studio 2010
Hello enghouse,
For this reason, I would be very grateful if you can arrange for us a simple code, where we can reproduce your problem exactly here.
Thanks,
I couldn't reproduce your problem, using next code the MouseDown and MouseUp:I have the following problem: I'm using the .NET version of TeeChart in Visual Studio 2012, having a TChart control on a form, chart that displays series of elements. The problem is that when I click on one of the elements the MouseUp event is not being triggered (MouseDown is always, which is good). On the MouseDown I'm setting some variables so I know it enters in dragging mode, so I can select more elements at once until the mouse button is up, but because the MouseUp is not triggered it's always in "dragging" mode. There's no such problem in the ActiveX version of the TeeChart, where it's also drawing a rectangle while dragging, rectangle that is not being drawn in the .NET version (this is less important than the MouseUp not being triggered).
Code: Select all
private Steema.TeeChart.Styles.Line Series1;
private void InitializeChart()
{
tChart1.Aspect.View3D = false;
Series1 = new Steema.TeeChart.Styles.Line(tChart1.Chart);
Series1.FillSampleValues();
tChart1.MouseUp += tChart1_MouseUp;
tChart1.MouseDown += tChart1_MouseDown;
}
int X;
void tChart1_MouseDown(object sender, MouseEventArgs e)
{
X = e.X;
}
void tChart1_MouseUp(object sender, MouseEventArgs e)
{
this.Text = "GetXDownBalue"+e.X.ToString();
}
We need your application to reproduce and understand your problem. Could you send us a simple project where we can run as-is here, because we can try to find a solution for your problem?I'm also having another problem: I'm using the .NET version of TeeChart in Visual Studio 2012, having a TChart control on a form, chart that displays series of elements. On a form I have a grid where each row corresponds to one of the displayed elements on the chart. When I select one or more rows in the grid it's supposed to be selecting the corresponding elements on the chart. In the ActiveX version of the chart it works fine, all of the corresponding elements in the chart get selected. However, in the .NET version they don't get selected. And here is the strange part: in the .NET version, after selecting something in the grid and not seeing the corresponding elements on the chart being selected, I click any one of the icons in the taskbar (icons corresponding to programs already running, like my application or some other program) and then the elements on the chart that should have been highlighted get highlighted.
Thanks,
Best Regards,
Sandra Pazos / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: TeeChart5 in Visual Studio 2010
Hi Sandra,
I finally got a small sample regarding the second problem, the one where it's not selecting the elements on the chart (the other one, with the mouse up event got solved by removing and re-adding the event). In this sample, it uses the FillSampleValues() function to fill 4 bars and sets the color to pink. I also have a list box with 4 elements and whenever I select one of them it should color the corresponding bar in red and the rest in green. There's a comment in the code that explains what you have to do in order to actually work (shift focus to other windows, etc.).
Thank you
I finally got a small sample regarding the second problem, the one where it's not selecting the elements on the chart (the other one, with the mouse up event got solved by removing and re-adding the event). In this sample, it uses the FillSampleValues() function to fill 4 bars and sets the color to pink. I also have a list box with 4 elements and whenever I select one of them it should color the corresponding bar in red and the rest in green. There's a comment in the code that explains what you have to do in order to actually work (shift focus to other windows, etc.).
Thank you
- Attachments
-
- WindowsFormsApplication1.zip
- Sample application.
- (35.01 KiB) Downloaded 427 times
Re: TeeChart5 in Visual Studio 2010
Hello enghouse,
Second, the problem occurs because you need update chart for each color of series. For this reason, you must add methods Refresh(), Invalidate or Draw() of chart in the loop as I have made in next lines of code:
Could you confirm us if the problem is solved using my modifications of code?
I hope will helps.
Thanks,
First, I am glad that your first problem solved .I finally got a small sample regarding the second problem, the one where it's not selecting the elements on the chart (the other one, with the mouse up event got solved by removing and re-adding the event). In this sample, it uses the FillSampleValues() function to fill 4 bars and sets the color to pink. I also have a list box with 4 elements and whenever I select one of them it should color the corresponding bar in red and the rest in green. There's a comment in the code that explains what you have to do in order to actually work (shift focus to other windows, etc.).
Second, the problem occurs because you need update chart for each color of series. For this reason, you must add methods Refresh(), Invalidate or Draw() of chart in the loop as I have made in next lines of code:
Code: Select all
private Steema.TeeChart.Styles.Bar Series1;
public Form1()
{
InitializeComponent();
InitializeChart();
}
private void InitializeChart()
{
m_chart.Aspect.View3D = false;
Series1 = new Steema.TeeChart.Styles.Bar(m_chart.Chart);
Series1.FillSampleValues(listBox1.Items.Count);
for (int k = 0; k < listBox1.Items.Count; k++)
{
Series1.Colors[k] = Color.HotPink;
}
m_chart.BringToFront();
}
private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
{
//I have modified the for updating for each value the series.
//Also, I have modified the condition of for because I consider is more correct use the count of Series.
for (int i = 0; i < m_chart[0].Count; i++)
{
m_chart[0][i].Color = (i == listBox1.SelectedIndex ? Color.Red : Color.Green);
m_chart.Refresh();
}
}
}
I hope will helps.
Thanks,
Best Regards,
Sandra Pazos / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: TeeChart5 in Visual Studio 2010
Hi Sandra,
The modifications do solve the problem, however, I did the refresh outside of the loop since as I have many elements it is slow done within the loop.
Thank you.
The modifications do solve the problem, however, I did the refresh outside of the loop since as I have many elements it is slow done within the loop.
Thank you.
Re: TeeChart5 in Visual Studio 2010
Hello enghouse,
Your suggestion is correct. When I checked your problem and I added the m_chart.Refresh() method out of the loop I saw the colors isn't updated, but now I test it again and seems works perfectly. I am glad you can solve your problem. I have attached the code as a solution for other clients:
Thanks,
Your suggestion is correct. When I checked your problem and I added the m_chart.Refresh() method out of the loop I saw the colors isn't updated, but now I test it again and seems works perfectly. I am glad you can solve your problem. I have attached the code as a solution for other clients:
Code: Select all
private Steema.TeeChart.Styles.Bar Series1;
private void InitializeChart()
{
m_chart.Aspect.View3D = false;
Series1 = new Steema.TeeChart.Styles.Bar(m_chart.Chart);
Series1.FillSampleValues(listBox1.Items.Count);
for (int k = 0; k < listBox1.Items.Count; k++)
{
Series1.Colors[k] = Color.HotPink;
}
m_chart.BringToFront();
}
private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
{
for (int i = 0; i < m_chart[0].Count; i++)
{
m_chart[0][i].Color = (i == listBox1.SelectedIndex ? Color.Red : Color.Green);
}
m_chart.Refresh();
}
Thanks,
Best Regards,
Sandra Pazos / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |