Skip to Content
0

viz frame connecting dots

Dec 19, 2017 at 01:12 PM

55

avatar image
Former Member

I want the points to be linked even if there are missing values.

How can you not show every date?

var oDataset = new sap.viz.ui5.data.FlattenedDataset({
		dimensions : [{
			name : "Datum und Uhrzeit",
			value : "{date}",
			dataType : "date"
			}],
			measures : [
			{
			name : "Wert",
			value : "{value}"
			}],
			data : {
			path : "/row"
			}
		});
		oVizFrame.setDataset(oDataset);
		oVizFrame.setModel(oModel);
		oVizFrame.setVizType("line");
		
		//4.Set Viz properties
		oVizFrame.setVizProperties({
		title: {
            text: diagName
        },
        valueAxis: {
        	title: {
	            visible: false
    		 }
    	},
    	categoryAxis: {
        	title: {
	            visible: false
        	}
    	},
    	legend : {
    		visible: false
    	},
		plotArea: {
		colorPalette : ["#0101DF","#F6CECE","#F6CECE"],
		marker:{visible : false},
		dataPoint:{invalidity: "ignore"},
	    referenceLine: {
                        line: {
                            valueAxis: [{
                                value: og,
                                visible: true,
                                size: 1,
                                type: "dotted",
                                label: {
                                    text: "Obergrenze",
                                    visible: true
                                }
								},{
                                value: ug,
                                visible: true,
                                size: 1,
                                type: "dotted",
                                label: {
                                    text: "Untergrenze",
                                    visible: true
                                }
							}]
                        }
                    }


		}});
		
		var feedCategoryAxis = new sap.viz.ui5.controls.common.feeds.FeedItem({
		"uid": "categoryAxis",
		"type": "Dimension",
		"values": ["Datum und Uhrzeit"]
		}),
		feedValueAxis = new sap.viz.ui5.controls.common.feeds.FeedItem({
		"uid": "valueAxis",
		"type": "Measure",
		"values": ["Wert"]
		});
    	oVizFrame.addFeed(feedCategoryAxis);
		oVizFrame.addFeed(feedValueAxis);
		return oVizFrame;
	}
	});
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
avatar image
Former Member
Dec 27, 2017 at 03:25 AM
0

As you have date value defined as dimension, you could try using timeseries_line chart which comes with plotArea.dataPoint.invalidity. This property could allow you to connect the dots over the missing value. A sample is availble on https://sapui5.hana.ondemand.com/#/sample/sap.viz.sample.TimeConfig/preview

Share
10 |10000 characters needed characters left characters exceeded
Iftah Peretz
Dec 21, 2017 at 10:24 PM
0

I don't understand what do you mean. In the SDK the dots are connecting(choose the small dataset, this seems "far" so that it looks like there are "missing values").

For a better answer, provide clarifications, view code, the dataset used, more relevant controller code or better yet a jsfiddle or something of that sort.

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Jan 03 at 07:33 AM
0

Thanks,

i have found the mistake.

The property invalidity is just available in the timeline.

Share
10 |10000 characters needed characters left characters exceeded