WireBootstrap
HomeDocsBuySupport
  • Introduction
  • Overview
  • Getting Started
  • Installation
  • Connecting to Data
    • Data Connectors
      • SQL Data
      • Custom Web Services
      • Local Data
      • Other Sources
    • Data Sources
    • Discovery
    • Building a Data Connector
  • Working With Queries
    • Select Queries
      • Query Extensions
    • Stored Procedures
    • Custom Web Services
    • Executing Queries
    • ORM
  • Writing Data
  • Updates
  • Deletes
  • Working with DataTables
    • Introduction
    • Filter and Sort
    • Select and Calculate
    • Joins
    • Rows
    • Columns
  • Working with DataSets
  • Introduction
  • Executing Queries
  • Transforms
  • Writing Data
  • Data Events
  • Working with Components
    • Introduction
    • Encapsulation
    • Configuration
      • Data
      • Events
      • Observables
      • Validation
      • Display
      • Vendor
      • Custom
    • Component
    • Web Frameworks
    • Building a Component
      • Hello World
      • Data Events
      • DataSets
  • Working With Data Events
    • Introduction
    • Event Basics
    • Event Data
    • Event Actions
  • Working with Themes
    • Introduction
    • Sample Data
    • Libraries
    • Pages
    • Building a Theme Project
  • Utilities
    • Formatting
    • Expressions
    • Collections
    • Spinners
    • Copy and Merge
    • Validation
    • Loading Assets
    • Service Calls
    • Download Files
    • Browser Location
    • Types
    • Promise
  • Reference
    • wire
      • wire.Collection
      • wire.download
      • wire.validate
    • wire.data
      • wire.data.DataEvent
      • wire.data.DataModel
      • wire.data.DataPromise
      • wire.data.DataSet
      • wire.data.DataSource
      • wire.data.DataTable
        • Columns
        • Rows
      • wire.data.StoredProcedure
      • wire.data.TableQuery
    • wire.ui
      • wire.ui.Component
      • wire.ui.validate
Powered by GitBook
On this page

Was this helpful?

  1. Working with Themes

Sample Data

PreviousIntroductionNextLibraries

Last updated 3 years ago

Was this helpful?

The sample data for most WireBootstrap theme projects is in a JSONs file located at \data\sampleData.json.

Below is one of the records in the sample data file.

 {
        "Product": "All-Purpose Bike Stand",
        "Promotion": "No Discount",
        "OrderYear": "2019",
        "OrderMonth": "2019-02",
        "Cost": 951.4560,
        "Sales": 2544.0000
 }
const sampleDataSource = new wire.data.DataSource("local", {
    Provider: { 
        Json: {url: "../../data/sampleData.json" } 
    },
  ...
});  

Data Model

const sampleDataSource = new wire.data.DataSource("local", {
    ...
    Model: new wire.data.DataModel({
        Fields: [
            { Entity: "SampleData", Name: "Sales", Format: "C0" },
            { Entity: "SampleData", Name: "Cost", Format: "C0" }
        ]
    })
});  

A is created from the sample data file located in the same directory at sampleData.ts.

Adding a tells WireBootstrap about the sample data so its able to automatically add data attributes such asSample Data formatting and display labels to result sets on behalf of components.

local data source
data model
Project Data Directory