User (Legacy) Posted October 26, 2004 Report Posted October 26, 2004 Hello I'm using ChartFX ClientServer 5.1 (it is integrated in ActiveReport2). I have to develope a chart according to the sample attached. I generated the SQL result set with 7 Series, for the red rectangle I have the minimum and maximum values. But I didn't succeed to generate this chart. What gallerytype should I use? I tried it with stacked bar and added 2 white bars for filling bottom and top space. But it somehow glues to the zeroline! Please help, this is rather urgent! Thanks in advance Luzia
Software FX Posted October 26, 2004 Report Posted October 26, 2004 This code will give you a nice starting point but I don't think you will be able to get the series legend box exactly as in your picture. You may want to try using the UserLegendBox. // Hardcoded data chart1.OpenData(COD.Values,3,3); chart1.OpenData(COD.IniValues,3,3); chart1.Value[0,0] = 38; chart1.Value[1,0] = 12; chart1.Value[2,0] = 5; chart1.Value[0,1] = 28; chart1.Value[1,1] = 14; chart1.Value[2,1] = 7; chart1.Value[0,2] = -4; chart1.Value[1,2] = -6; chart1.Value[2,2] = -8; // Note that line chart will ignore ini Values // so we only supply ini values for bars, this could not be correct if user can change galleries chart1.IniValue[0,0] = -10; chart1.IniValue[0,1] = -40; chart1.IniValue[0,2] = -12; chart1.CloseData(COD.IniValues); chart1.CloseData(COD.Values); chart1.Series[0].Gallery = Gallery.Bar; chart1.Series[0].Color = Color.Transparent; chart1.Series[0].BorderColor = Color.Red; chart1.Series[0].BorderEffect = BorderEffect.None; chart1.Series[1].Gallery = Gallery.Lines; chart1.Series[2].Gallery = Gallery.Lines; chart1.AxisY.Max = 50; chart1.AxisY.Min = -50; // Use Annotations to get Min-Max labels AnnotationX annotationX = new AnnotationX(); chart1.Extensions.Add(annotationX); // You will probably do this in a loop for all values/inivalues of series 0 AnnotationText annText = new AnnotationText(); annotationX.List.Add(annText); double maxValue = chart1.Value[0,0]; annText.Text = maxValue.ToString(); annText.Color = Color.White; annText.Border.Color = Color.Transparent; // Note that nth bar is drawn at X=n+1 so that is where we need to attach it annText.Attach(1,maxValue); -- Regards, JC Software FX Support "Luzia Baumgartner" <nospam@spam.ch> wrote in message news:ON9b122uEHA.420@webserver3.softwarefx.com... > Hello > > I'm using ChartFX ClientServer 5.1 (it is integrated in ActiveReport2). I > have to develope a chart according to the sample attached. > > I generated the SQL result set with 7 Series, for the red rectangle I have > the minimum and maximum values. > > But I didn't succeed to generate this chart. What gallerytype should I > use? > I tried it with stacked bar and added 2 white bars for filling bottom and > top space. But it somehow glues to the zeroline! > > Please help, this is rather urgent! > > Thanks in advance > Luzia > > > > >
Software FX Posted October 26, 2004 Report Posted October 26, 2004 Sorry, I just realized your question was about ChartFX Client Server 5.1 and I replied using ChartFX for .NET code. You should be able to translate the code ... Remove BorderEffect (this property does not exist on 5.1) Replace Chart1.AxisY with Chart1.Axis(AXIS_Y) The parameter for AnnotationText.Attach is a string -- Regards, JC Software FX Support "Software FX Support" <noreply> wrote in message news:g3bIQm4uEHA.424@webserver3.softwarefx.com... > This code will give you a nice starting point but I don't think you will > be able to get the series legend box exactly as in your picture. You may > want to try using the UserLegendBox. > > // Hardcoded data > chart1.OpenData(COD.Values,3,3); > chart1.OpenData(COD.IniValues,3,3); > chart1.Value[0,0] = 38; > chart1.Value[1,0] = 12; > chart1.Value[2,0] = 5; > > chart1.Value[0,1] = 28; > chart1.Value[1,1] = 14; > chart1.Value[2,1] = 7; > > chart1.Value[0,2] = -4; > chart1.Value[1,2] = -6; > chart1.Value[2,2] = -8; > > // Note that line chart will ignore ini Values > // so we only supply ini values for bars, this could not be correct if > user can change galleries > chart1.IniValue[0,0] = -10; > chart1.IniValue[0,1] = -40; > chart1.IniValue[0,2] = -12; > > chart1.CloseData(COD.IniValues); > chart1.CloseData(COD.Values); > > chart1.Series[0].Gallery = Gallery.Bar; > chart1.Series[0].Color = Color.Transparent; > chart1.Series[0].BorderColor = Color.Red; > chart1.Series[0].BorderEffect = BorderEffect.None; > chart1.Series[1].Gallery = Gallery.Lines; > chart1.Series[2].Gallery = Gallery.Lines; > > chart1.AxisY.Max = 50; > chart1.AxisY.Min = -50; > > // Use Annotations to get Min-Max labels > AnnotationX annotationX = new AnnotationX(); > chart1.Extensions.Add(annotationX); > > // You will probably do this in a loop for all values/inivalues of series > 0 > AnnotationText annText = new AnnotationText(); > annotationX.List.Add(annText); > double maxValue = chart1.Value[0,0]; > annText.Text = maxValue.ToString(); > annText.Color = Color.White; > annText.Border.Color = Color.Transparent; > > // Note that nth bar is drawn at X=n+1 so that is where we need to attach > it > annText.Attach(1,maxValue); > > -- > Regards, > > JC > Software FX Support > "Luzia Baumgartner" <nospam@spam.ch> wrote in message > news:ON9b122uEHA.420@webserver3.softwarefx.com... >> Hello >> >> I'm using ChartFX ClientServer 5.1 (it is integrated in ActiveReport2). I >> have to develope a chart according to the sample attached. >> >> I generated the SQL result set with 7 Series, for the red rectangle I >> have >> the minimum and maximum values. >> >> But I didn't succeed to generate this chart. What gallerytype should I >> use? >> I tried it with stacked bar and added 2 white bars for filling bottom and >> top space. But it somehow glues to the zeroline! >> >> Please help, this is rather urgent! >> >> Thanks in advance >> Luzia >> >> >> >> >> > >
User (Legacy) Posted October 27, 2004 Author Report Posted October 27, 2004 Hello JC Thank you JC! The thing with the iniValues works fine. Now I have two more questions (be aware that I use ChartFX Client Server 5.1) : - Can I set the Color of the bar transparent? - How do I use the UserLegendBox? I didn't find anything in the help thanks and regars Luzia "Software FX Support" <noreply> schrieb im Newsbeitrag news:xSbelo4uEHA.420@webserver3.softwarefx.com... > Sorry, I just realized your question was about ChartFX Client Server 5.1 > and I replied using ChartFX for .NET code. You should be able to translate > the code ... > > Remove BorderEffect (this property does not exist on 5.1) > Replace Chart1.AxisY with Chart1.Axis(AXIS_Y) > The parameter for AnnotationText.Attach is a string > > -- > Regards, > > JC > Software FX Support > "Software FX Support" <noreply> wrote in message > news:g3bIQm4uEHA.424@webserver3.softwarefx.com... >> This code will give you a nice starting point but I don't think you will >> be able to get the series legend box exactly as in your picture. You may >> want to try using the UserLegendBox. >> >> // Hardcoded data >> chart1.OpenData(COD.Values,3,3); >> chart1.OpenData(COD.IniValues,3,3); >> chart1.Value[0,0] = 38; >> chart1.Value[1,0] = 12; >> chart1.Value[2,0] = 5; >> >> chart1.Value[0,1] = 28; >> chart1.Value[1,1] = 14; >> chart1.Value[2,1] = 7; >> >> chart1.Value[0,2] = -4; >> chart1.Value[1,2] = -6; >> chart1.Value[2,2] = -8; >> >> // Note that line chart will ignore ini Values >> // so we only supply ini values for bars, this could not be correct if >> user can change galleries >> chart1.IniValue[0,0] = -10; >> chart1.IniValue[0,1] = -40; >> chart1.IniValue[0,2] = -12; >> >> chart1.CloseData(COD.IniValues); >> chart1.CloseData(COD.Values); >> >> chart1.Series[0].Gallery = Gallery.Bar; >> chart1.Series[0].Color = Color.Transparent; >> chart1.Series[0].BorderColor = Color.Red; >> chart1.Series[0].BorderEffect = BorderEffect.None; >> chart1.Series[1].Gallery = Gallery.Lines; >> chart1.Series[2].Gallery = Gallery.Lines; >> >> chart1.AxisY.Max = 50; >> chart1.AxisY.Min = -50; >> >> // Use Annotations to get Min-Max labels >> AnnotationX annotationX = new AnnotationX(); >> chart1.Extensions.Add(annotationX); >> >> // You will probably do this in a loop for all values/inivalues of series >> 0 >> AnnotationText annText = new AnnotationText(); >> annotationX.List.Add(annText); >> double maxValue = chart1.Value[0,0]; >> annText.Text = maxValue.ToString(); >> annText.Color = Color.White; >> annText.Border.Color = Color.Transparent; >> >> // Note that nth bar is drawn at X=n+1 so that is where we need to attach >> it >> annText.Attach(1,maxValue); >> >> -- >> Regards, >> >> JC >> Software FX Support >> "Luzia Baumgartner" <nospam@spam.ch> wrote in message >> news:ON9b122uEHA.420@webserver3.softwarefx.com... >>> Hello >>> >>> I'm using ChartFX ClientServer 5.1 (it is integrated in ActiveReport2). >>> I >>> have to develope a chart according to the sample attached. >>> >>> I generated the SQL result set with 7 Series, for the red rectangle I >>> have >>> the minimum and maximum values. >>> >>> But I didn't succeed to generate this chart. What gallerytype should I >>> use? >>> I tried it with stacked bar and added 2 white bars for filling bottom >>> and >>> top space. But it somehow glues to the zeroline! >>> >>> Please help, this is rather urgent! >>> >>> Thanks in advance >>> Luzia >>> >>> >>> >>> >>> >> >> > >
Software FX Posted October 27, 2004 Report Posted October 27, 2004 > - Can I set the Color of the bar transparent? We define CHART_TRANSPARENT as 0x40000000 > - How do I use the UserLegendBox? I didn't find anything in the help This is not supported in 5.X, I am afraid you may have to paint the legend box on your own as the default series legend box will not show exactly as you want. -- Regards, JC Software FX Support "Luzia Baumgartner" <nospam@spam.ch> wrote in message news:znfQzWDvEHA.3556@webserver3.softwarefx.com... > Hello JC > > Thank you JC! The thing with the iniValues works fine. > > Now I have two more questions (be aware that I use ChartFX Client Server > 5.1) : > > - Can I set the Color of the bar transparent? > - How do I use the UserLegendBox? I didn't find anything in the help > > thanks and regars > Luzia > > "Software FX Support" <noreply> schrieb im Newsbeitrag > news:xSbelo4uEHA.420@webserver3.softwarefx.com... >> Sorry, I just realized your question was about ChartFX Client Server 5.1 >> and I replied using ChartFX for .NET code. You should be able to >> translate the code ... >> >> Remove BorderEffect (this property does not exist on 5.1) >> Replace Chart1.AxisY with Chart1.Axis(AXIS_Y) >> The parameter for AnnotationText.Attach is a string >> >> -- >> Regards, >> >> JC >> Software FX Support >> "Software FX Support" <noreply> wrote in message >> news:g3bIQm4uEHA.424@webserver3.softwarefx.com... >>> This code will give you a nice starting point but I don't think you will >>> be able to get the series legend box exactly as in your picture. You may >>> want to try using the UserLegendBox. >>> >>> // Hardcoded data >>> chart1.OpenData(COD.Values,3,3); >>> chart1.OpenData(COD.IniValues,3,3); >>> chart1.Value[0,0] = 38; >>> chart1.Value[1,0] = 12; >>> chart1.Value[2,0] = 5; >>> >>> chart1.Value[0,1] = 28; >>> chart1.Value[1,1] = 14; >>> chart1.Value[2,1] = 7; >>> >>> chart1.Value[0,2] = -4; >>> chart1.Value[1,2] = -6; >>> chart1.Value[2,2] = -8; >>> >>> // Note that line chart will ignore ini Values >>> // so we only supply ini values for bars, this could not be correct if >>> user can change galleries >>> chart1.IniValue[0,0] = -10; >>> chart1.IniValue[0,1] = -40; >>> chart1.IniValue[0,2] = -12; >>> >>> chart1.CloseData(COD.IniValues); >>> chart1.CloseData(COD.Values); >>> >>> chart1.Series[0].Gallery = Gallery.Bar; >>> chart1.Series[0].Color = Color.Transparent; >>> chart1.Series[0].BorderColor = Color.Red; >>> chart1.Series[0].BorderEffect = BorderEffect.None; >>> chart1.Series[1].Gallery = Gallery.Lines; >>> chart1.Series[2].Gallery = Gallery.Lines; >>> >>> chart1.AxisY.Max = 50; >>> chart1.AxisY.Min = -50; >>> >>> // Use Annotations to get Min-Max labels >>> AnnotationX annotationX = new AnnotationX(); >>> chart1.Extensions.Add(annotationX); >>> >>> // You will probably do this in a loop for all values/inivalues of >>> series 0 >>> AnnotationText annText = new AnnotationText(); >>> annotationX.List.Add(annText); >>> double maxValue = chart1.Value[0,0]; >>> annText.Text = maxValue.ToString(); >>> annText.Color = Color.White; >>> annText.Border.Color = Color.Transparent; >>> >>> // Note that nth bar is drawn at X=n+1 so that is where we need to >>> attach it >>> annText.Attach(1,maxValue); >>> >>> -- >>> Regards, >>> >>> JC >>> Software FX Support >>> "Luzia Baumgartner" <nospam@spam.ch> wrote in message >>> news:ON9b122uEHA.420@webserver3.softwarefx.com... >>>> Hello >>>> >>>> I'm using ChartFX ClientServer 5.1 (it is integrated in ActiveReport2). >>>> I >>>> have to develope a chart according to the sample attached. >>>> >>>> I generated the SQL result set with 7 Series, for the red rectangle I >>>> have >>>> the minimum and maximum values. >>>> >>>> But I didn't succeed to generate this chart. What gallerytype should I >>>> use? >>>> I tried it with stacked bar and added 2 white bars for filling bottom >>>> and >>>> top space. But it somehow glues to the zeroline! >>>> >>>> Please help, this is rather urgent! >>>> >>>> Thanks in advance >>>> Luzia >>>> >>>> >>>> >>>> >>>> >>> >>> >> >> > >
User (Legacy) Posted November 10, 2004 Author Report Posted November 10, 2004 Hello JC thanks, the transparent filling is ok. the automatically produced Legend is ok regards, Luzia "Software FX Support" <noreply> schrieb im Newsbeitrag news:EXF6meEvEHA.3408@webserver3.softwarefx.com... >> - Can I set the Color of the bar transparent? > > We define CHART_TRANSPARENT as 0x40000000 > >> - How do I use the UserLegendBox? I didn't find anything in the help > > This is not supported in 5.X, I am afraid you may have to paint the legend > box on your own as the default series legend box will not show exactly as > you want. > > -- > Regards, > > JC > Software FX Support > "Luzia Baumgartner" <nospam@spam.ch> wrote in message > news:znfQzWDvEHA.3556@webserver3.softwarefx.com... >> Hello JC >> >> Thank you JC! The thing with the iniValues works fine. >> >> Now I have two more questions (be aware that I use ChartFX Client Server >> 5.1) : >> >> - Can I set the Color of the bar transparent? >> - How do I use the UserLegendBox? I didn't find anything in the help >> >> thanks and regars >> Luzia >> >> "Software FX Support" <noreply> schrieb im Newsbeitrag >> news:xSbelo4uEHA.420@webserver3.softwarefx.com... >>> Sorry, I just realized your question was about ChartFX Client Server 5.1 >>> and I replied using ChartFX for .NET code. You should be able to >>> translate the code ... >>> >>> Remove BorderEffect (this property does not exist on 5.1) >>> Replace Chart1.AxisY with Chart1.Axis(AXIS_Y) >>> The parameter for AnnotationText.Attach is a string >>> >>> -- >>> Regards, >>> >>> JC >>> Software FX Support >>> "Software FX Support" <noreply> wrote in message >>> news:g3bIQm4uEHA.424@webserver3.softwarefx.com... >>>> This code will give you a nice starting point but I don't think you >>>> will be able to get the series legend box exactly as in your picture. >>>> You may want to try using the UserLegendBox. >>>> >>>> // Hardcoded data >>>> chart1.OpenData(COD.Values,3,3); >>>> chart1.OpenData(COD.IniValues,3,3); >>>> chart1.Value[0,0] = 38; >>>> chart1.Value[1,0] = 12; >>>> chart1.Value[2,0] = 5; >>>> >>>> chart1.Value[0,1] = 28; >>>> chart1.Value[1,1] = 14; >>>> chart1.Value[2,1] = 7; >>>> >>>> chart1.Value[0,2] = -4; >>>> chart1.Value[1,2] = -6; >>>> chart1.Value[2,2] = -8; >>>> >>>> // Note that line chart will ignore ini Values >>>> // so we only supply ini values for bars, this could not be correct if >>>> user can change galleries >>>> chart1.IniValue[0,0] = -10; >>>> chart1.IniValue[0,1] = -40; >>>> chart1.IniValue[0,2] = -12; >>>> >>>> chart1.CloseData(COD.IniValues); >>>> chart1.CloseData(COD.Values); >>>> >>>> chart1.Series[0].Gallery = Gallery.Bar; >>>> chart1.Series[0].Color = Color.Transparent; >>>> chart1.Series[0].BorderColor = Color.Red; >>>> chart1.Series[0].BorderEffect = BorderEffect.None; >>>> chart1.Series[1].Gallery = Gallery.Lines; >>>> chart1.Series[2].Gallery = Gallery.Lines; >>>> >>>> chart1.AxisY.Max = 50; >>>> chart1.AxisY.Min = -50; >>>> >>>> // Use Annotations to get Min-Max labels >>>> AnnotationX annotationX = new AnnotationX(); >>>> chart1.Extensions.Add(annotationX); >>>> >>>> // You will probably do this in a loop for all values/inivalues of >>>> series 0 >>>> AnnotationText annText = new AnnotationText(); >>>> annotationX.List.Add(annText); >>>> double maxValue = chart1.Value[0,0]; >>>> annText.Text = maxValue.ToString(); >>>> annText.Color = Color.White; >>>> annText.Border.Color = Color.Transparent; >>>> >>>> // Note that nth bar is drawn at X=n+1 so that is where we need to >>>> attach it >>>> annText.Attach(1,maxValue); >>>> >>>> -- >>>> Regards, >>>> >>>> JC >>>> Software FX Support >>>> "Luzia Baumgartner" <nospam@spam.ch> wrote in message >>>> news:ON9b122uEHA.420@webserver3.softwarefx.com... >>>>> Hello >>>>> >>>>> I'm using ChartFX ClientServer 5.1 (it is integrated in >>>>> ActiveReport2). I >>>>> have to develope a chart according to the sample attached. >>>>> >>>>> I generated the SQL result set with 7 Series, for the red rectangle I >>>>> have >>>>> the minimum and maximum values. >>>>> >>>>> But I didn't succeed to generate this chart. What gallerytype should I >>>>> use? >>>>> I tried it with stacked bar and added 2 white bars for filling bottom >>>>> and >>>>> top space. But it somehow glues to the zeroline! >>>>> >>>>> Please help, this is rather urgent! >>>>> >>>>> Thanks in advance >>>>> Luzia >>>>> >>>>> >>>>> >>>>> >>>>> >>>> >>>> >>> >>> >> >> > >
Recommended Posts
Archived
This topic is now archived and is closed to further replies.