Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview

Preconditions

How to…?

...

In this document, we will learn how to create a “Chart” control on Wayfast and how it’s going to be associated to any data in tables or stored procedures that we can depict every time that the page is being loaded or updated.

How to prepare the data for Chart’s representation in SQL?

First we need to connect to our Database in SQL and establish values that are we going to use to represent the chart, in this case, it’s important to setup the color palette with hexadecimal color code chart.

For example, we can create a new table:

CREATE TABLE “Color_Palete” with the following columns: “PaletteCode”, “ColorOrder”, “ColorCode” and “ID”

...

NOTE: This is an example, you can include all the details that is needed for your project.

Then we need to create another table with certain information establishing status information. In this case, we used “First Name”, “Last Name” and “Status” columns.

...

After we have both tables generated and including values, we can create the Stored Procedure needed for setting up the “Chart” control.

...

How to create and setup a “Chart” control?

Turn to Project’s pages dashboard.

Select or create a new page where you can introduce the chart to represent the data previously created in SQL.

Under “Controls” section, select “Chart” option from dropdown list.

Click “New” button

A popup is displayed on screen to fill the required fields for the control’s creation.

In “General” tab, you can include all the details related to identify the control in Project.

At “Data Binding” tab, there are the most important fields to run the chart control with the necessary information from the DB. Let’s take a look over those fields in details:

Field

Description

SQL Query

You have to include the STored Procedure or Table from DB created exclusively to represent the chart

Instance

Environment in our project that we are going to display the “Chart” control

Type of Graph

Dropdown list with all the chart’s type that Wayfast provide us to display in our project.

Categories

TBD

Series

TBD

Once we setup the Stored Procedure with the control, we can establish the “Layout” information to display the chart in the page.

Recap