3.7 Best Practices & Tips

  1. Keep Names Unique:

    • The <route name="…">, <canvas name="…">, and <dataset name="…"> should each have unique identifiers within your application.

  2. Use Meaningful Labels:

    • The <label> elements help end-users quickly identify pages or controls. Provide multi-language <label lang="cs">…</label> if needed.

  3. Hierarchical Menus:

    • Use parent="…" in <route> to create sub-menus. This helps keep your application organized.

  4. Bridging Entities:

    • If you have many-to-many relationships, define a bridging resource as main_entity.other_entity, and handle fields accordingly.

  5. Resource Types:

    • If you are referencing a Datanest entity or bridging entity, set resourceType="entity".

    • For count-based resources or specialized queries, you can define resourceType="count".

  6. Chart Fields:

    • Always specify xField, xLabel, yField, yLabel for charts to help the Dashboard present data properly.

  7. Testing:

    • Start with a simple <dashboard:section> (one route, one canvas, one dataset) to verify everything works. Then expand.

Last updated