on 04-05-2007 3:38 PM
I have a chart that I would like to take the datalink value of an iBrowser and stick it in the chart's title.
<param name="Title" value="Line {<b>LINE</b>} Shift Percent Uptime">
I know the above doesn't work because it does not know where to look for it, but I tried placing the below javascript in between the {} brackets and it comes up blank on the screen. This tells me it is able to put something there, but what I have it not correct.
This is the correct syntax for extract the Line value from the iBrowser.
<b>document.Line.getBrowserObject().getSelectedDatalinkValue()</b>
What should I do?
Use:
document.yourChartApplet.getChartObject().setTitle("Line " + document.Line.getBrowserObject().getSelectedDatalinkValue() + " Shift Percent Uptime");
document.yourChartApplet.updateChart(false);
- Rick
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here is what I have so far. I have three charts on one web page which the top chart has a time refresh control that updates the other two charts. I also have an iBrowser that allows the user to pick a line and click the GO button to update all three charts. The problem I am seeing with your title creation you helped me on is when the charts are created and when the charts get updated. When the charts get created all three charts show the default line in the title. So no problem here. Once I select a line and click GO, only charts 2 and 3 actually get updated. The reason for this is when I create the charts, I am actually updating the title in chart 1 which then triggers the UpdateEvent. This then throws it in a loop. So I guess the question is please review my functions below and tell me how I can update the first chart without the endless loop?
Thanks!!
function UpdateDetails()
{
FR_Runtime_DailyHistory.getQueryObject().setStartDate(FR_Runtime_ShiftHistory.getQueryObject().getStartDate());
FR_Runtime_DailyHistory.getQueryObject().setEndDate(FR_Runtime_ShiftHistory.getQueryObject().getEndDate());
//FR_Runtime_DailyHistory.updateChart(true);
FR_Runtime_WeeklyHistory.getQueryObject().setStartDate(FR_Runtime_ShiftHistory.getQueryObject().getStartDate());
FR_Runtime_WeeklyHistory.getQueryObject().setEndDate(FR_Runtime_ShiftHistory.getQueryObject().getEndDate());
//FR_Runtime_WeeklyHistory.updateChart(true);
document.FR_Runtime_ShiftHistory.getChartObject().setTitle("Line " + document.Line.getBrowserObject().getSelectedDatalinkValue() + " Shift Percent Uptime");
document.FR_Runtime_DailyHistory.getChartObject().setTitle("Line " + document.Line.getBrowserObject().getSelectedDatalinkValue() + " Daily Percent Uptime");
document.FR_Runtime_WeeklyHistory.getChartObject().setTitle("Line " + document.Line.getBrowserObject().getSelectedDatalinkValue() + " Weekly Percent Uptime");
<b> //document.FR_Runtime_ShiftHistory.refresh(); LOOPS
//document.FR_Runtime_ShiftHistory.updateChart(true); LOOPS</b>
document.FR_Runtime_DailyHistory.updateChart(true);
document.FR_Runtime_WeeklyHistory.updateChart(true);
}
function changeTitle()
{
document.FR_Runtime_ShiftHistory.getChartObject().setTitle("Line " + document.Line.getBrowserObject().getSelectedDatalinkValue() + " Shift Percent Uptime");
document.FR_Runtime_DailyHistory.getChartObject().setTitle("Line " + document.Line.getBrowserObject().getSelectedDatalinkValue() + " Daily Percent Uptime");
document.FR_Runtime_WeeklyHistory.getChartObject().setTitle("Line " + document.Line.getBrowserObject().getSelectedDatalinkValue() + " Weekly Percent Uptime");
document.FR_Runtime_ShiftHistory.updateChart(true);
document.FR_Runtime_DailyHistory.updateChart(true);
document.FR_Runtime_WeeklyHistory.updateChart(true);
}
<u><b>FR_Runtime_ShiftHistory Applet</b></u>
<param name="UpdateEvent" value="UpdateDetails">
<param name="CreationEvent" value="changeTitle">
I didn't look through this completely, but if the updateChart(true) on the FR_Runtime_ShiftHistory applet causes a loop, try doing this:
document.FR_Runtime_ShiftHistory.setUpdateEventEnabled(false); //turn off update event
document.FR_Runtime_ShiftHistory.updateChart(true); //update chart
document.FR_Runtime_ShiftHistory.setUpdateEventEnabled(true); //turn update event back on
Actually, you should not call updateChart(true) unless you need to re-retrieve the back end data. In this case, you should call updateChart(false) (since you are only changing "appearance" properties). In general, if you're not changing query parameters or data binding parameters, you don't need to call updateChart(true).
- Rick
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Adding a follow up question
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If it is on the same page then you could do something like
document.iChart.getChartObject().setTitle(document.iBrowser.getBrowserObject().getSelectedDatalinkValue());
document.iChart.updateChart(false);
if it is on a page you are opening then on the opener page use
document.iChart.setPropertyValue("mytitle",.iBrowser.getBrowserObject().getSelectedDatalinkValue());
and then on the opened page
<param name="Title" value="">
Regards,
Jamie
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
10 | |
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.