cancel
Showing results for 
Search instead for 
Did you mean: 

VizFrame: Obscure error message 50053

Former Member
0 Kudos

Hi,

creating a VizFrame, I encounter the following error message:

Anlegen des Diagramms fehlgeschlagen:[50053] - Unvollständige Dimensionsbindung

In english:

Failed to create diagram - Incomplete dimension binding

This happens due to my VizFrame definition which looks like this:


var dataModel = new sap.ui.model.json.JSONModel(data);

var vizFrame = this.getView().byId("idVizFrameLine");

var popOver = this.getView().byId("idPopOver");

var dataset = new sap.viz.ui5.data.FlattenedDataset({

   dimensions: [{

        name: 'Last x months',

        value: "{Erdat}"

      }],

      measures: [{

        name: 'Posting Rate',

        value: '{RateMmPosted}'

      }],

      data: {

        path: "/results"

      }

});

vizFrame.setVizProperties({

  valueAxis: {

        label: {

          formatString: 'u'

        }

  },

  dataPointStyle: {

        "rules": [{

          "dataContext": [{

            "Erdat": ""

          }],

          "properties": {

            "dataLabel": true

          },

          "displayName": ""

        }],

        "others": {

          "properties": {

            "dataLabel": false

          },

          "displayName": "Others"

        }

      },

     

      lineStyle: {

          rules: [{

            dataContext: [{

              Erdat: ""

            }],

            properties: {

              width: 4

            }

          }]

        },

      title: {

        visible: true,

        text: 'Posting Rate for the last three months'

      }

});

vizFrame.setModel(dataModel);

vizFrame.setDataset(dataset);

var feedValueAxis = new sap.viz.ui5.controls.common.feeds.FeedItem({

   'uid': "valueAxis",

   'type': "Measure",

   'values': ["RateMmPosted"]

}),

feedCategoryAxis = new sap.viz.ui5.controls.common.feeds.FeedItem({

   'uid': "categoryAxis",

   'type': "Dimension",

   'values': ["Erdat"]

}),

feedColor = new sap.viz.ui5.controls.common.feeds.FeedItem({

   'uid': "color",

   'type': "Dimension",

   'values': ["Erdat"]

});

vizFrame.addFeed(feedValueAxis);

vizFrame.addFeed(feedCategoryAxis);

vizFrame.addFeed(feedColor);

popOver.connect(vizFrame.getVizUid());

Erdat is an ISO formatted date, RateMmPosted is a double value. The graph is painted when I use the mock data and code from the Sample: Line with Conditional Data Label from the Explored section.

What's the best way to get the graph running.

Is it possible to do something like when dates are not supported?


var dataset = new sap.viz.ui5.data.FlattenedDataset({

   dimensions: [{

        name: 'Last x months',

        value: "{Erdat.getMonth()}"

      }],

      measures: [{

        name: 'Posting Rate',

        value: '{RateMmPosted}'

      }],

Kind regards,

Michael

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I'm trying to wrap this topic up with what I think is the correct solution to the problem at the time.

In the dataset, the name attribute has to be same as in the values arrays of the feeds.

Answers (2)

Answers (2)

Former Member
0 Kudos

After solving this error temporarily, it's hounding me again, because my chart legend looks awful. It's filled with the OData service property names.

Why can't I do the following?

  1. var dataset = new sap.viz.ui5.data.FlattenedDataset({ 
  2.    dimensions: [{ 
  3.         name: 'Date'
  4.         value: "{Erdat}" 
  5.       }], 
  6.       measures: [{ 
  7.         name: 'Rate'
  8.         value: '{RateMmPosted}' 
  9.       }], 
  10.       data: { 
  11.         path: "/results" 
  12.       } 
  13. }); 


To me it would be plausible that "name" refers to the legend name, or the nice name, whereas "value" refers to the technical name, which can be whatever the service offers. Here a screen of the legend:

Has anyone an idea how to set "nice" names for the legend and chart properties?

Oh, and in case you get the 50003 error, it's probably of the different names between name and value.

Former Member
0 Kudos

After a lot of trial and error, I found the solution, the "name" property in the dataset and the "values" in the feed items have to be the same:

var dataset = this._getDataset(dateFrom, dateTo, mode, lifnr, bukrs);
vizFrame.setDataset(dataset);
var feedCategoryAxis = new sap.viz.ui5.controls.common.feeds.FeedItem({
    'uid': "categoryAxis",
'type': "Dimension",
'values': ["Date"]
});
var feedValueAxis = new sap.viz.ui5.controls.common.feeds.FeedItem({
    'uid': "valueAxis",
    'type': "Measure",
    'values': ["Documents", "Rate"]
});
vizFrame.addFeed(feedValueAxis);

vizFrame.addFeed(feedCategoryAxis);

var dataset = new sap.viz.ui5.data.FlattenedDataset({
dimensions: [
    {
        name: 'Date',
        value: {
path: 'Erdat',
type: new sap.ui.model.type.Date({pattern: this.bundle.getText("DateFormat")})
        }
    }
],
    measures: [
        {
name: 'Documents',
value: "{SumMm}"
        },
        {
        name: 'Rate',
        value: {
path: 'RateMmPosted'
        }
        }
],

I hope it's possible to insert the names from my i18n files here, because they need to be localized.

Edit: Sorry for the bad formatting, but syntax highlighting is not working, because my code is inserted as a table.

0 Kudos

Just for the record: you get the same error if other issues occur. It's not really instructive.

I had troubles with realizing that FeedItem uids are actually picked up from controlled dictionary and not free form, and that besides they are chart type specific.

So for example, for "line" chart type FeedItem uid="timeAxis" is not acceptable (you get the same error you quoted here) and instead it should be uid="categoryAxis". For 'timeseries_line' chart on the other hand, uid="timeAxis" is the right one and uid="categoryAxis" would be wrong.

The reference for the right uids for each chart type is documented here: https://sapui5.hana.ondemand.com/docs/vizdocs/index.html

I don't know... this looks too brittle API to me... I lost too much time in such issues...

former_member213564
Participant
0 Kudos

Hi Michael,

did you manage to insert your names from your i18n model?

Best regards,

Filip

Former Member
0 Kudos

Yes, I did. Model itself is created in the Component.js, as seen in the examples.

In my onBeforeRendering method, in the controller of my view, I set the bundle like this


  this.bundle = this.getView().getModel("i18n").getResourceBundle();

and I use it like this during graph creation:


_getDataset: function(/*parameters here*/) {

  var dataset = new sap.viz.ui5.data.FlattenedDataset({

  dimensions: [

     {

          name: this.bundle.getText("Date"),

         value: {

          path: 'Date',

          type: new sap.ui.model.type.Date({pattern: this.bundle.getText("DateFormat")})

         }

     }

  ],

     measures: [

         {

          name: this.bundle.getText("Documents"),

          value: "{Stuff}"

         },

         {

         name: this.bundle.getText("Rate"),

         value: {

          path: 'Rate'

          /*

          ,formatter: function (rate) {

          return Math.floor(Math.random() * (1000 - 1)) + 1;

          }

          */

         }

         }

            ],

     data: {

         path: "/Statistic",

         filters: [

               // a couple filters

         ],

         templateShareable: false

     }

  });

  return dataset;

  }

or here


vizFrame.setVizProperties({

  title: {

         visible: true,

         text: title

     },

     legend: {

                visible: true,

                title: {

                visible: false

                }

            },

            legendGroup: {

            layout: {

            position: "bottom"

            }

            },

  valueAxis: {

  title: {

  text: this.bundle.getText("yAxisLabel"),

  }

  },

  categoryAxis: {

  title: {

  text: this.bundle.getText("Date")

  }

  }

  });

or


var feedCategoryAxis = new sap.viz.ui5.controls.common.feeds.FeedItem({

     'uid': "categoryAxis",

  'type': "Dimension",

  'values': [this.bundle.getText("Date")]

  });

  var feedValueAxis = new sap.viz.ui5.controls.common.feeds.FeedItem({

     'uid': "valueAxis",

     'type': "Measure",

     'values': [this.bundle.getText("Stuff"), this.bundle.getText("OtherStuff")]

  });

former_member213564
Participant
0 Kudos

Thanks Michael, it works

0 Kudos

Hi Michael,

Have you solved your issue? what is your solution.

same issue happened to me .

Best Regards

Jone.

Former Member
0 Kudos

Hi Jone,

I can't remember the error from that time, but here is our working solution:

var vizFrame = this.getView().byId(idToPlaceGraph);

vizFrame.setVizProperties({

  title: {

        visible: true,

        text: 'Hot stuff'

    },

    legend: {

        visible: false

    },

  valueAxis: {

  title: {

  text: 'Rate of documents posted to Tardis',

  }

  },

  categoryAxis: {

  title: {

  text: 'Date'

  }

  }

});

var dataset = new sap.viz.ui5.data.FlattenedDataset({

  dimensions: [

     {

         name: 'Erdat',

         value: {

          path: 'Erdat',

          type: new sap.ui.model.type.Date({pattern: "MM/dd/yyyy"})

         }

     }

  ],

    measures: [

        {

         name: 'RateMmPosted',

         value: {

          path: 'RateMmPosted'

         }

        }

    ],

    data: {

        path: "/ServiceWho",

        filters: [

       new sap.ui.model.Filter("DateFrom", sap.ui.model.FilterOperator.EQ, this._getStartDateAsString()),

       new sap.ui.model.Filter("DateTo", sap.ui.model.FilterOperator.EQ, this._getCurrentDateAsString()),

       new sap.ui.model.Filter("Mode", sap.ui.model.FilterOperator.EQ, mode),

       new sap.ui.model.Filter("Lifnr", sap.ui.model.FilterOperator.EQ, lifnr),

       new sap.ui.model.Filter("Bukrs", sap.ui.model.FilterOperator.EQ, bukrs)

    ],

    templateShareable: false

    }

});

vizFrame.setDataset(dataset);

var feedCategoryAxis = new sap.viz.ui5.controls.common.feeds.FeedItem({

    'uid': "categoryAxis",

  'type': "Dimension",

  'values': ["Erdat"]

});

var feedValueAxis = new sap.viz.ui5.controls.common.feeds.FeedItem({

    'uid': "valueAxis",

    'type': "Measure",

    'values': ["RateMmPosted"]

});

vizFrame.addFeed(feedValueAxis);

vizFrame.addFeed(feedCategoryAxis);

var popOver = this.getView().byId(popoverId);

popOver.connect(vizFrame.getVizUid());

The Measure is the y-axis, the dimension the x-axis. Multiple measures are possible, when you use a combination graph, you need two measures, the first measure is for the bar chart, the second measure for the line graph.

It took a while to get this to work, because of the lacking documentation and examples of course.

Kind regards,

Michael