on 05-20-2015 4:29 PM
Hello everyone,
I'm currently trying to create a new analytical application with SAPUI5, which uses the VizFrame that can be found in the Explored section of the developer center.
But as with everything I've encountered with UI5 yet, it's pretty badly documented how to use the various tools. I'm starting to get annoyed by the constant trial and error when implementing another feature of the framework.
Hence my question, am I doing something wrong here?
I look at the examples in Explored, I take it for my own as a starting point, I want to know more about setVizProperties, FlattenedDataset, or FeedItem, and the only thing I find is the API Documentation which says for example:
getVizProperties() : object
Getter for property vizProperties. Chart properties, refer to chart property doc for more details.
or
setVizProperties(oVizProperties) : sap.viz.ui5.controls.VizFrame
Properties for viz frame.
Parameters:
| {object} | oVizProperties |
No possiblity to learn more about vizProperties, what they are, what they can do, how to best use them etc. No link in the API documentation to another section where I can learn about vizProperties. How to approach such a problem, when you want to stay close to UI5?
Are there any places to find better documentation, tutorials, or full examples? Am I looking at the wrong places?
If not it's time for SAP to step up the game and do something about it. The API documentation must be more detailed, the examples in the Explored section should be documented with code comments, we need tutorials from the people writing these APIs, to understand them better.
Kind regards,
Michael
Hi Michael,
Totally agreed to the point regarding documentation. However, I will try to answer in a simple manner hoping this will be helpful.
Let's take an example you are using vizType="column" in your sap.viz.ui5.controls.VizFrame, then vizProperties basically will be same as settings in JsDoc Report - SAP UI development Toolkit for HTML5 - API Reference - sap.viz.ui5.Column
Best regards,
Preetam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Preetam
I partially agree with you. With a lot of effort and drill-down to see properties and constructors it is possible to get some properties. But some of them remain a mistery to me.
Let's take sample code for Viz with type Line. I'm still using version 1.28.5, so let's use it as reference.
In the setVizProperties in the sample "Line with Conditional Data Label", there are properties like:
When I go to the Line constructor, I can see yAxis and xAxis properties, but no valueAxis properties.
PlotArea type is sap.viz.ui5.types.Line. When I go to sap.viz.ui5.types.Line constructor, I see no dataPointStyle property.
So, or the documentation is wrong, or it's more confuse than it seems to be.
I would open a new thread about it, but as this one is still unanswered, let's wait if anyone can answer.
Hi Former Member,
You can find those properties here - https://sapui5.hana.ondemand.com/docs/vizdocs/index.html
P.S - Thanks to for providing the link.
Regards,
Sai Vellanki.
I'm currently facing the similar problem as Michael. After spending hours, it is still not clear how to implement heatmap or scatter plot based on the sample code in Explored. I think the code in Explored could be simpler. It is unnecessary to include so many code on sophisticated interfaction of buttions. It would be much helpful if the sample code includes the least amount of code to make the plot working. Any code not serving this purpose are confusing.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I totally agree Michael! My development process is the same as yours...the documentation doesn't say anything about purpose... and it's even more frustrating when you have experience with well documented libs such as highcharts..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
https://sapui5.netweaver.ondemand.com/sdk/#docs/api/symbols/sap.viz.ui5.html
HI Michael,
I understand your need based on the scenario you are describing. it seems like you are needing some code samples which are also found on the explored tab for each control. In your example for the vizFrame, you may click into one of the various examples (bar, bubble, column, etc) and when you see the actual graph you are looking for, then you may click on the top right hand side corner on the icon (show source code for this sample) and you will see the xml view and also the controller js code you will need to replicate the example into your own code.
additional documentation about viz charts properties, events, methods can be found here (see link above)
I hope this helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In my view code snippets don't replace a good API, which with Javascript is especially important since everything is untyped. An "Object" parameter can be anything, if the API doesn't describe what the API expects, it's painful to use.
Code snippets help, but you can't expect to have code snippets for every possible parameter. Example for the FlattenedDataSet Constructor
Constructor for a new ui5/data/FlattenedDataset.
Accepts an object literal mSettings that defines initial property values, aggregated and associated objects as well as event handlers.
If the name of a setting is ambiguous (e.g. a property has the same name as an event), then the framework assumes property, aggregation, association, event in that order. To override this automatic resolution, one of the prefixes "aggregation:", "association:" or "event:" can be added to the name of the setting (such a prefixed name must be enclosed in single or double quotes).
The supported settings are:
- Properties
- Aggregations
- dimensions : sap.viz.ui5.data.DimensionDefinition[]
- measures : sap.viz.ui5.data.MeasureDefinition[]
- data : sap.ui.core.Element[]
- Associations
- Events
In addition, all settings applicable to the base type sap.viz.ui5.data.Dataset can be used as well.
What properties? What associations? I'm I supposed to go look into the source code? This isn't enough
I agree the VizFrame API needs some work. I also felt your frustration trying to understand it from the very few code snippets available, and it was one of the reasons I started creating my own library. SimpleCharts is a reference to my experience with VizFrame.
An obscure API leads to unnecessary trouble.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 3 | |
| 3 | |
| 2 | |
| 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.