MSChart Changing Colors
Kadir
T??rkiye
I'm trying to change MSChart colors to fromARGB which came from data.
here is the code I couldnt understand what is the problem.
public class ReportScript
{
int x = 0 ;
Color[] clr = new Color[3] ;
private void Data1_BeforeLayout(object sender, EventArgs e)
{
}
private void ReportSummary1_BeforeLayout(object sender, EventArgs e)
{
MSChart2.Chart.Series[0].Points[0].Color = clr[0] ;
MSChart2.Chart.Series[0].Points[1].Color = clr[1] ;
MSChart2.Chart.Series[0].Points[2].Color = clr[2] ;
Text25.TextColor = clr[0] ;
Text26.TextColor = clr[1] ;
Text27.TextColor = clr[2] ;
}
private void GroupHeader1_BeforeLayout(object sender, EventArgs e)
{
clr[x] =Color.FromArgb(((Int32)Report.GetColumnValue("VERI.a_renk")));
x+=1 ;
}
}
Thanks for helping.
here is the code I couldnt understand what is the problem.
public class ReportScript
{
int x = 0 ;
Color[] clr = new Color[3] ;
private void Data1_BeforeLayout(object sender, EventArgs e)
{
}
private void ReportSummary1_BeforeLayout(object sender, EventArgs e)
{
MSChart2.Chart.Series[0].Points[0].Color = clr[0] ;
MSChart2.Chart.Series[0].Points[1].Color = clr[1] ;
MSChart2.Chart.Series[0].Points[2].Color = clr[2] ;
Text25.TextColor = clr[0] ;
Text26.TextColor = clr[1] ;
Text27.TextColor = clr[2] ;
}
private void GroupHeader1_BeforeLayout(object sender, EventArgs e)
{
clr[x] =Color.FromArgb(((Int32)Report.GetColumnValue("VERI.a_renk")));
x+=1 ;
}
}
Thanks for helping.
Comments
When tried your code (and also mine) I took CS0246 Name or name does not exist ... then I add using
using System.Windows.Forms.DataVisualization;
then
I took CS0234 error, means The type or namespace name 'name' does not exist in the namespace
This was so helpful.
By the way, i found where my mistake is...
Report / Options / script And simply add the assembly...