For example,
I have to add xData & yData in a series. How can I pass ?
In dot net,
objChartSeries.Add(xData, yData);
How can I add x & y value in a series ?
Re: How can I add x & y value in a series ?
Hello,
If you wish to create the Chart in HTML5 directly from TeeChart for Net it will parse the javascript for you.
See:
https://github.com/Steema/TeeChart-NET- ... %20WebDemo
If you are working in javascript, here are some examples:
Regards,
Marc Meumann
If you wish to create the Chart in HTML5 directly from TeeChart for Net it will parse the javascript for you.
See:
https://github.com/Steema/TeeChart-NET- ... %20WebDemo
If you are working in javascript, here are some examples:
Code: Select all
Chart1.addSeries(new Tee.Line()).pointer.visible=true;
Chart1.addSeries(new Tee.Line()).pointer.visible=true;
Chart1.addSeries(new Tee.Line()).pointer.visible=true;
Chart1.series.items[0].data.values = [7];
Chart1.series.items[0].data.x = [10];
Chart1.series.items[1].data.values = [7,14,4,21,15];
Chart1.series.items[1].data.x = [0,1,2,5,7,];
Chart1.series.items[2].data.values = [24];
Chart1.series.items[2].data.x = [11];
Marc Meumann
Steema Support
Re: How can I add x & y value in a series ?
it didn't work in angular.
- Attachments
-
- data.jpg (23 KiB) Viewed 27975 times
Re: How can I add x & y value in a series ?
Not working data.x
Code: Select all
ngAfterViewInit() {
this.tChart1 = new Tee.Chart("canvas1");
var aLine = new Tee.Line();
this.tChart1.addSeries(aLine);
// this.tChart1.applyTheme("minimal");
this.tChart1.legend.visible = false;
this.tChart1.axes.bottom.labels.rotation = 90;
this.tChart1.series.items[0].format.stroke.size = 3;
aLine.smooth = 0.25;
this.tChart1.title.text = "TeeChart for Angular";
this._weather.dailyForecast().subscribe((res) => {
let temp_max = res["list"].map((res) => res.main.temp_max);
let temp_min = res["list"].map((res) => res.main.temp_min);
let alldates = res["list"].map((res) => res.dt);
let weatherDates = [];
alldates.forEach((res) => {
let jsdate = new Date(res * 1000);
weatherDates.push(
jsdate.toLocaleTimeString("en", {
year: "numeric",
month: "short",
day: "numeric",
})
);
});
//connect to weather data
aLine.data.values = temp_max;
aLine.data.x = new Array(temp_min);
for (var t = 0; t < temp_min; t++) {
aLine.data.x[t] = temp_min[t];
}
aLine.data.labels = weatherDates;
//plot chart
this.tChart1.draw();
});
- Attachments
-
- angular.png (59.66 KiB) Viewed 27883 times