Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updates for samples testing thru component renderer testHost #746

Open
wants to merge 12 commits into
base: 24.2.x
Choose a base branch
from
Open
2 changes: 1 addition & 1 deletion code-gen-library/MultipleStocks/Blazor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public static TitledStockData ConvertData(Dictionary<string, object>[] arr)
var date = ((JsonElement)json["date"]).GetString();
var parts = date.Split('-'); // "2020-01-01"
var item = new MultipleStocksItem();
item.Date = new DateTime(int.Parse(parts[0]), int.Parse(parts[1]) + 1, int.Parse(parts[2]));
item.Date = new DateTime(int.Parse(parts[0]), int.Parse(parts[1]) + 1, int.Parse(parts[2]),12,0,0);
item.Open = ((JsonElement)json["open"]).GetDouble();
item.High = ((JsonElement)json["high"]).GetDouble();
item.Low = ((JsonElement)json["low"]).GetDouble();
Expand Down
2 changes: 1 addition & 1 deletion code-gen-library/MultipleStocks/WPF.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public static TitledStockData ConvertData(JArray arr)
var date = json.Value<string>("date");
var parts = date.Split('-'); // "2020-01-01"
var item = new MultipleStocksItem();
item.Date = new DateTime(int.Parse(parts[0]), int.Parse(parts[1]) + 1, int.Parse(parts[2]));
item.Date = new DateTime(int.Parse(parts[0]), int.Parse(parts[1]) + 1, int.Parse(parts[2]),12,0,0);
item.Open = json.Value<double>("open");
item.High = json.Value<double>("high");
item.Low = json.Value<double>("low");
Expand Down
2 changes: 1 addition & 1 deletion code-gen-library/MultipleStocks/Web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export class MultipleStocks extends Array<Array<StockItem>> {
for (let json of jsonData) {
let parts = json.date.split("-"); // "2020-01-01"
let item = new StockItem();
item.date = new Date(parts[0], parts[1], parts[2]);
item.date = new Date(parts[0], parts[1], parts[2],13,0,0);
item.open = json.open;
item.high = json.high;
item.low = json.low;
Expand Down
10 changes: 6 additions & 4 deletions code-gen-library/SelectionMatcherOnViewInit/Blazor.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
//begin imports
using IgniteUI.Blazor.Controls;
using System;
using System.Collections.Generic;
using System.Collections;
//end imports

import { CodeGenHelper } from 'igniteui-webcomponents-core';
Expand All @@ -11,7 +13,7 @@ public class SelectionMatcherOnViewInit

private System.Threading.Timer _timer;

private void SelectionMatcherOnViewInit()
public void SelectionMatcherOnViewInit()
{
_timer = new System.Threading.Timer((_) =>
{
Expand All @@ -22,9 +24,9 @@ private void SelectionMatcherOnViewInit()
private void addSelection()
{
var chart = CodeGenHelper.GetDescription<IgbCategoryChart>("content");

var data = CodeGenHelper.FindByName<IList>("EnergyRenewableConsumption");
IgbChartSelection selection = new IgbChartSelection();
selection.Item = EnergyRenewableConsumption[1];
selection.Item = data[1];
IgbSeriesMatcher matcher = new IgbSeriesMatcher();
matcher.MemberPath = "Solar";
matcher.MemberPathType = "ValueMemberPath";
Expand All @@ -33,7 +35,7 @@ private void addSelection()
chart.SelectedSeriesItems.Add(selection);

selection = new IgbChartSelection();
selection.Item = EnergyRenewableConsumption[1];
selection.Item = data[1];
matcher = new IgbSeriesMatcher();
matcher.MemberPath = "Hydro";
matcher.MemberPathType = "ValueMemberPath";
Expand Down
5 changes: 3 additions & 2 deletions code-gen-library/SelectionMatcherOnViewInit/React.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ export class SelectionMatcherOnViewInit
var chart = CodeGenHelper.getDescription<IgrCategoryChart>("content");

this._timer = setInterval(() => {
var data = CodeGenHelper.findByName<any[]>("energyRenewableConsumption");
var selection = new IgrChartSelection();
selection.item = this.energyRenewableConsumption[1];
selection.item = data[1];

var matcher = new IgrSeriesMatcher();
matcher.memberPath = "solar";
Expand All @@ -25,7 +26,7 @@ export class SelectionMatcherOnViewInit

chart.selectedSeriesItems.add(selection);

selection.item = this.energyRenewableConsumption[1];
selection.item = data[1];
matcher.memberPath = "hydro";
matcher.memberPathType = "ValueMemberPath";
selection.matcher = matcher;
Expand Down
3 changes: 3 additions & 0 deletions code-gen-library/SelectionMatcherOnViewInit/WPF.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Threading;
using Infragistics.Controls.Charts;
using System.Collections;
//end imports

import { CodeGenHelper } from 'igniteui-webcomponents-core';
Expand Down
2 changes: 1 addition & 1 deletion code-gen-library/SelectionMatcherOnViewInit/Web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export class SelectionMatcherOnViewInit

var chart = CodeGenHelper.getDescription<IgcCategoryChartComponent>("content");

this._timer = setInterval(() => {
this._timer = setTimeout(() => {
var data = CodeGenHelper.findByName<any[]>("energyRenewableConsumption");
let selection: IgcChartSelection = new IgcChartSelection();
selection.item = data[1];
Expand Down
Loading
Loading