User (Legacy) Posted October 20, 2004 Report Share Posted October 20, 2004 Hi, Apologies for the binary post, but sometimes it's easier to describe a problem with pictures. I have an XY chart for availability with two series, daily and monthly availability. I want the series to be stacked over one another with the daily being a bar and the monthly being a line. The result I get is in the attachment avail_bar.jpg. How do I get the the bar series to center align underneath the marker points of the line series? When I set the bar to a line, I get the correct result (see avail_line.jpg). I have the stacked property of each series set to true. thanks, Avner Link to comment Share on other sites More sharing options...
Software FX Posted October 21, 2004 Report Share Posted October 21, 2004 Note that we use "stack" to refer to accumulating values as in StackedBar.png chart1.Gallery = Gallery.Bar; chart1.Stacked = Stacked.Normal; chart1.OpenData(COD.Values,2,3); chart1.Value[0,0] = 30; chart1.Value[0,1] = 45; chart1.Value[0,2] = 22; chart1.Value[1,0] = 33; chart1.Value[1,1] = 59; chart1.Value[1,2] = 23; chart1.CloseData(COD.Values); Now, the chart that you want can be accomplished as long as you do not assign X values to the chart, see BarLine.png chart1.Series[0].Gallery = Gallery.Bar; chart1.Series[1].Gallery = Gallery.Lines; chart1.OpenData(COD.Values,2,3); chart1.Value[0,0] = 30; chart1.Value[0,1] = 45; chart1.Value[0,2] = 22; chart1.Value[1,0] = 33; chart1.Value[1,1] = 59; chart1.Value[1,2] = 23; chart1.CloseData(COD.Values); From your screenshots it appears as if you have a date column that is being used as X values, please try using the DataType property to use the dates as Labels. Note that by doing this you will switch to a "categorical" axis where all the points are equally spaced regardless of the date they represent. You can still control formatting by manipulating the Format properties before you DataBind. -- Regards, JC Software FX Support "Avner" <a.silberman@hotmail.com> wrote in message news:2XcjHWwtEHA.3240@webserver3.softwarefx.com... > Hi, > > Apologies for the binary post, but sometimes it's easier to describe a > problem with pictures. > > I have an XY chart for availability with two series, daily and monthly > availability. I want the series to be stacked over one another with the > daily being a bar and the monthly being a line. The result I get is in the > attachment avail_bar.jpg. > > How do I get the the bar series to center align underneath the marker > points > of the line series? > When I set the bar to a line, I get the correct result (see > avail_line.jpg). > I have the stacked property of each series set to true. > > thanks, > > Avner > > > Attachments.zip Link to comment Share on other sites More sharing options...
User (Legacy) Posted October 21, 2004 Author Report Share Posted October 21, 2004 Yes you were right, setting the date column to labels solved the problem. thanks very much. "Software FX Support" <noreply> wrote in message news:nU4yCD7tEHA.3240@webserver3.softwarefx.com... > Note that we use "stack" to refer to accumulating values as in > StackedBar.png > > chart1.Gallery = Gallery.Bar; > chart1.Stacked = Stacked.Normal; > > chart1.OpenData(COD.Values,2,3); > chart1.Value[0,0] = 30; > chart1.Value[0,1] = 45; > chart1.Value[0,2] = 22; > > chart1.Value[1,0] = 33; > chart1.Value[1,1] = 59; > chart1.Value[1,2] = 23; > chart1.CloseData(COD.Values); > > Now, the chart that you want can be accomplished as long as you do not > assign X values to the chart, see BarLine.png > > chart1.Series[0].Gallery = Gallery.Bar; > chart1.Series[1].Gallery = Gallery.Lines; > > chart1.OpenData(COD.Values,2,3); > chart1.Value[0,0] = 30; > chart1.Value[0,1] = 45; > chart1.Value[0,2] = 22; > > chart1.Value[1,0] = 33; > chart1.Value[1,1] = 59; > chart1.Value[1,2] = 23; > chart1.CloseData(COD.Values); > > From your screenshots it appears as if you have a date column that is being > used as X values, please try using the DataType property to use the dates as > Labels. Note that by doing this you will switch to a "categorical" axis > where all the points are equally spaced regardless of the date they > represent. You can still control formatting by manipulating the Format > properties before you DataBind. > > > -- > Regards, > > JC > Software FX Support > "Avner" <a.silberman@hotmail.com> wrote in message > news:2XcjHWwtEHA.3240@webserver3.softwarefx.com... > > Hi, > > > > Apologies for the binary post, but sometimes it's easier to describe a > > problem with pictures. > > > > I have an XY chart for availability with two series, daily and monthly > > availability. I want the series to be stacked over one another with the > > daily being a bar and the monthly being a line. The result I get is in the > > attachment avail_bar.jpg. > > > > How do I get the the bar series to center align underneath the marker > > points > > of the line series? > > When I set the bar to a line, I get the correct result (see > > avail_line.jpg). > > I have the stacked property of each series set to true. > > > > thanks, > > > > Avner > > > > > > > > > Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.