User (Legacy) Posted March 17, 2003 Report Share Posted March 17, 2003 I'm currently using ChartFX IE 2000 on our IIS webserver. I have a chart that has a list of stages in a process as the X axis data and a number value for the Y axis. I need the X axis to be split up into several categories of stages, so I used Annotation line objects to create a line at certain stages. Therefore, as a simple example, the X axis would look like the following: | Stage1 Stage2 Stage3 | Stage4 Stage5 Stage6 | Stage7 Stage8 Stage9 | I also use text box annotation objects to add more information to each one of the stage categories that are placed underneath the stage names and between the lines that separate the stage categories. This has worked Ok in a way. I use the following code to position the objects. For the stage category lines, I use: Category.Attach 1,"5,-90" where Category is the line annotation object. I am wanting the object to be attached to the 5th stage, and I have to use -90 so that the lines will appear below the x-axis. The line object is set with a height of 143 in order to get the line to take up the room between the x-axis and the top of the legend box at the bottom of the graph. This in and of itself is strange because the numbers don't add up. It seems that the line would be drawn from the -90 value to 143 pixels below that, but it isn't. This sets the line to start at the x-axis and go down to the legend box. I use the same method for the text objects that are centered between these lines, again attached to a certain stage. My problem occurs when either you zoom in on the graph, when you try to print the graph, or you resize the graph (not dynamically, but from the server side before the graph is drawn). The objects are no longer really attached to the right spot. The lines and text boxes move vertically. If I understand the attach method correctly, the objects are supposed to remain attached to the values that I assigned them to, no matter if the user zooms, scrolls, or prints. But this is not the case. Any suggestions on how to set these objects permanently to a certain stage value so that they will always appear in the same place?? I'm sorry I cannot give a good code example because the information presented by the graph is proprietary. I appreciate any insight on this problem. Link to comment Share on other sites More sharing options...
Software FX Posted March 18, 2003 Report Share Posted March 18, 2003 >> Category.Attach 1,"5,-90" I am afraid zooming will cause trouble because your object is "attached" to value -90 in the Y axis (probably your min is close to this number) but zooming affects the Y axis so the object will be moved. Changing the min in the Y axis will also show a problem because your stage objects will be drawn inside of the charting area. You may want to try converting values to pixels (using the ValueToPixel method) so that you do not have to attach. Also note that if your data is variable, you may need to pass the data first and then request the Min in the Y axis or set it after passing the data to a known fixed value (e.g. -100) I know this may not help you right now but in ChartFX for .NET we can create multiple X axes and you can create groups so you would get very close to the chart you are building, maybe now is the time to move to .NET :-) -- Regards, JC Software FX Support "Blair Allen" <Blair.Allen@infineon.com> wrote in message news:C9aFmML7CHA.3148@webserver1.softwarefx.com... > I'm currently using ChartFX IE 2000 on our IIS webserver. I have a chart > that has a list of stages in a process as the X axis data and a number value > for the Y axis. I need the X axis to be split up into several categories of > stages, so I used Annotation line objects to create a line at certain > stages. Therefore, as a simple example, the X axis would look like the > following: > > | Stage1 Stage2 Stage3 | Stage4 Stage5 Stage6 | Stage7 Stage8 > Stage9 | > > I also use text box annotation objects to add more information to each one > of the stage categories that are placed underneath the stage names and > between the lines that separate the stage categories. This has worked Ok in > a way. I use the following code to position the objects. For the stage > category lines, I use: > > Category.Attach 1,"5,-90" > > where Category is the line annotation object. I am wanting the object to > be attached to the 5th stage, and I have to use -90 so that the lines will > appear below the x-axis. The line object is set with a height of 143 in > order to get the line to take up the room between the x-axis and the top of > the legend box at the bottom of the graph. This in and of itself is strange > because the numbers don't add up. It seems that the line would be drawn > from the -90 value to 143 pixels below that, but it isn't. This sets the > line to start at the x-axis and go down to the legend box. I use the same > method for the text objects that are centered between these lines, again > attached to a certain stage. > > My problem occurs when either you zoom in on the graph, when you try to > print the graph, or you resize the graph (not dynamically, but from the > server side before the graph is drawn). The objects are no longer really > attached to the right spot. The lines and text boxes move vertically. If I > understand the attach method correctly, the objects are supposed to remain > attached to the values that I assigned them to, no matter if the user zooms, > scrolls, or prints. But this is not the case. Any suggestions on how to > set these objects permanently to a certain stage value so that they will > always appear in the same place?? I'm sorry I cannot give a good code > example because the information presented by the graph is proprietary. I > appreciate any insight on this problem. > > Link to comment Share on other sites More sharing options...
User (Legacy) Posted March 19, 2003 Author Report Share Posted March 19, 2003 I understand what you are saying. I have two questions in regards to what you mentioned. First, if I set an annotation object to be attached to the 5 data value in the x-axis series (this series is categorical based on stage name) and to the value of 0 on the y-axis series, then shouldn't the line object start at the location where the x-axis is?? Whenever I do this, and keep in mind that the line object has a height of 100, the line is drawn a little above the x-axis. I'd say about 10 pixels or so, leaving about 90 pixels below the axis. This is using the 'Category.Attach 1,"5,0" statement. My understand is that the top left corner of the line object should be attached to the 0 value of the x-axis, no matter if you zoom in or not, according to the documentation. My second question is in regards to your suggestion of using the ValueToPixel method. When you use that method, will the line object stay in the same 'relative' location when you zoom in on the graph, or does the object always stay at the given x, y pixel position regardless of the zoom state?? Thanks. "Software FX Support" <support@softwarefx.com> wrote in message news:1#EDX3W7CHA.1960@webserver1.softwarefx.com... > >> Category.Attach 1,"5,-90" > > I am afraid zooming will cause trouble because your object is "attached" to > value -90 in the Y axis (probably your min is close to this number) but > zooming affects the Y axis so the object will be moved. Changing the min in > the Y axis will also show a problem because your stage objects will be drawn > inside of the charting area. You may want to try converting values to pixels > (using the ValueToPixel method) so that you do not have to attach. Also note > that if your data is variable, you may need to pass the data first and then > request the Min in the Y axis or set it after passing the data to a known > fixed value (e.g. -100) > > I know this may not help you right now but in ChartFX for .NET we can create > multiple X axes and you can create groups so you would get very close to the > chart you are building, maybe now is the time to move to .NET :-) > > -- > Regards, > > JC > Software FX Support > "Blair Allen" <Blair.Allen@infineon.com> wrote in message > news:C9aFmML7CHA.3148@webserver1.softwarefx.com... > > I'm currently using ChartFX IE 2000 on our IIS webserver. I have a chart > > that has a list of stages in a process as the X axis data and a number > value > > for the Y axis. I need the X axis to be split up into several categories > of > > stages, so I used Annotation line objects to create a line at certain > > stages. Therefore, as a simple example, the X axis would look like the > > following: > > > > | Stage1 Stage2 Stage3 | Stage4 Stage5 Stage6 | Stage7 > Stage8 > > Stage9 | > > > > I also use text box annotation objects to add more information to each one > > of the stage categories that are placed underneath the stage names and > > between the lines that separate the stage categories. This has worked Ok > in > > a way. I use the following code to position the objects. For the stage > > category lines, I use: > > > > Category.Attach 1,"5,-90" > > > > where Category is the line annotation object. I am wanting the object > to > > be attached to the 5th stage, and I have to use -90 so that the lines will > > appear below the x-axis. The line object is set with a height of 143 in > > order to get the line to take up the room between the x-axis and the top > of > > the legend box at the bottom of the graph. This in and of itself is > strange > > because the numbers don't add up. It seems that the line would be drawn > > from the -90 value to 143 pixels below that, but it isn't. This sets the > > line to start at the x-axis and go down to the legend box. I use the same > > method for the text objects that are centered between these lines, again > > attached to a certain stage. > > > > My problem occurs when either you zoom in on the graph, when you try to > > print the graph, or you resize the graph (not dynamically, but from the > > server side before the graph is drawn). The objects are no longer really > > attached to the right spot. The lines and text boxes move vertically. If > I > > understand the attach method correctly, the objects are supposed to remain > > attached to the values that I assigned them to, no matter if the user > zooms, > > scrolls, or prints. But this is not the case. Any suggestions on how to > > set these objects permanently to a certain stage value so that they will > > always appear in the same place?? I'm sorry I cannot give a good code > > example because the information presented by the graph is proprietary. I > > appreciate any insight on this problem. > > > > > > Link to comment Share on other sites More sharing options...
User (Legacy) Posted March 20, 2003 Author Report Share Posted March 20, 2003 You mention using the ValueToPixel method. I can't get it to work at all. Here's an example of how I use it (assume Chart object already exists): Dim x, y Chart.ValueToPixel 40, 0, x, y, AXIS_Y This always returns an error saying 'Type Mismatch: 'ValueToPixel'". I've even tried: Dim x, y x = CLng(0) y = CLng(0) Chart.ValueToPixel 40, 0, x, y, AXIS_Y But it still produces the same error. How exactly am I suppose to use this method??? Thanks for your help. "Software FX Support" <support@softwarefx.com> wrote in message news:1#EDX3W7CHA.1960@webserver1.softwarefx.com... > >> Category.Attach 1,"5,-90" > > I am afraid zooming will cause trouble because your object is "attached" to > value -90 in the Y axis (probably your min is close to this number) but > zooming affects the Y axis so the object will be moved. Changing the min in > the Y axis will also show a problem because your stage objects will be drawn > inside of the charting area. You may want to try converting values to pixels > (using the ValueToPixel method) so that you do not have to attach. Also note > that if your data is variable, you may need to pass the data first and then > request the Min in the Y axis or set it after passing the data to a known > fixed value (e.g. -100) > > I know this may not help you right now but in ChartFX for .NET we can create > multiple X axes and you can create groups so you would get very close to the > chart you are building, maybe now is the time to move to .NET :-) > > -- > Regards, > > JC > Software FX Support > "Blair Allen" <Blair.Allen@infineon.com> wrote in message > news:C9aFmML7CHA.3148@webserver1.softwarefx.com... > > I'm currently using ChartFX IE 2000 on our IIS webserver. I have a chart > > that has a list of stages in a process as the X axis data and a number > value > > for the Y axis. I need the X axis to be split up into several categories > of > > stages, so I used Annotation line objects to create a line at certain > > stages. Therefore, as a simple example, the X axis would look like the > > following: > > > > | Stage1 Stage2 Stage3 | Stage4 Stage5 Stage6 | Stage7 > Stage8 > > Stage9 | > > > > I also use text box annotation objects to add more information to each one > > of the stage categories that are placed underneath the stage names and > > between the lines that separate the stage categories. This has worked Ok > in > > a way. I use the following code to position the objects. For the stage > > category lines, I use: > > > > Category.Attach 1,"5,-90" > > > > where Category is the line annotation object. I am wanting the object > to > > be attached to the 5th stage, and I have to use -90 so that the lines will > > appear below the x-axis. The line object is set with a height of 143 in > > order to get the line to take up the room between the x-axis and the top > of > > the legend box at the bottom of the graph. This in and of itself is > strange > > because the numbers don't add up. It seems that the line would be drawn > > from the -90 value to 143 pixels below that, but it isn't. This sets the > > line to start at the x-axis and go down to the legend box. I use the same > > method for the text objects that are centered between these lines, again > > attached to a certain stage. > > > > My problem occurs when either you zoom in on the graph, when you try to > > print the graph, or you resize the graph (not dynamically, but from the > > server side before the graph is drawn). The objects are no longer really > > attached to the right spot. The lines and text boxes move vertically. If > I > > understand the attach method correctly, the objects are supposed to remain > > attached to the values that I assigned them to, no matter if the user > zooms, > > scrolls, or prints. But this is not the case. Any suggestions on how to > > set these objects permanently to a certain stage value so that they will > > always appear in the same place?? I'm sorry I cannot give a good code > > example because the information presented by the graph is proprietary. I > > appreciate any insight on this problem. > > > > > > Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.