on 08-08-2006 8:18 AM
Hi,
I have a chart of type "lines". On the x-axis the denomination is month, on the y-axis numbers between 0 and 100. I want the spaces between the months on the x-axis to be constant, even if I have different numbers of values belonging to each month. For instance, I have four numbers belonging to January, and only two numbers belonging to February. But still, I want the length of each month to be the same, meaning the spaces between each value belonging to January must be shorter than between the values belonging to February.
Anyone who knows how this can be done?
Kind Regards
Øyvind Isaksen
Hi Jørn ( or Øyvind ),
Try to use "time_scatter".
Let`s assume you have following context structure:
Series (cardinality 0..n, singleton true)
- values (cardinality 0..n, singleton false)
-- attr: value (type decimal)
-- attr: date (type string)
attr: serieslabel (type string)
Value attribute contains value.
date attribute contains date value with following conditions:
+
The following formats are valid:
· YYYYMMDD
· YYYYMMDD;HHMMSS
· YYYYMMDD;HHMMSSZZZ (H=hours, M=minutes, S=seconds, Z=milliseconds).
+ (accroding to
http://help.sap.com/saphelp_nw04/helpdata/en/a8/1cd93f5e0f9015e10000000a155106/frameset.htm)
UI elements properties:
Busines Graphics (chartType=time_scatter, seriesSource=Series)
+Series (label=Series.serieslabel, pointSource=Series.values)
+ + Point (valueSource=Series.values)
+ + + Numeric value (type=y, value=Series.values.value)
+ + + Time value (value=Series.values.date)
And that`s it.
Best regards, Maksim Rashchynski.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok I tried that. But I get a graphics rendering problem.
I want to get the values from a table, my implementation looks like:
public void onPlugShowBalanceGraphIn(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
{
int s = wdThis.wdGetBalanceCustController().wdGetContext().nodeBalance_Pr_Trans().size();
IPrivateBalanceGraphView.ISeriesElement seriesElement;
IPrivateBalanceGraphView.IValuesElement valuesElement;
for (int k = 0; k < s; k++){
seriesElement = wdContext.createSeriesElement();
wdContext.nodeSeries().addElement(seriesElement);
valuesElement = wdContext.createValuesElement();
wdThis.wdGetBalanceCustController().wdGetContext().nodeBalance_Pr_Trans().setLeadSelection(k);
valuesElement.setValue(wdThis.wdGetBalanceCustController().wdGetContext().nodeBalance_Pr_Trans().currentBalance_Pr_TransElement().getBalance());
valuesElement.setDate(wdThis.wdGetBalanceCustController().wdGetContext().nodeBalance_Pr_Trans().currentBalance_Pr_TransElement().getBalance_Date());
wdContext.nodeValues().addElement(valuesElement);
}//for
}
Do I have to add the elements (series and values) in a specific order?
Best regards
Øyvind Isaksen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.