问题描述
我已经成功地添加了低值和高值,但是,我仍然在为代表中间值的线而苦苦挣扎。到目前为止,这是我的代码:
const schema = [
{
"name": "Date","type": "date","format": "%Y-%m-%d",},{
"name": "Low","type": "number",{
"name": "High",];
type dataProperties = {Date: string,Low: number,High: number};
type lineProperties = {value: number};
let graphData: dataProperties[] = [];
let lineData: lineProperties[] = [];
let jsonData: dataProperties;
// Create an array of JSON objects from the data
for (let i = 1; i < data.EVI.length; i++) {
jsonData = {
Date: data.x[i],Low: data.EVI[i][2],High: data.EVI[i][0],};
graphData.push(jsonData);
lineData.push({value: data.EVI[i][1]});
}
this.variationOverTime = {
chart: {},dataset: [
{
"seriesName": "Mid","renderAs": "line","data": lineData // I'm guessing this is where I'm doing something wrong
}
],caption: {
text: "Vigour Block and Variation Over Time"
},yaxis: [
{
"plot": {
"value": {
high: "High",low: "Low"
},"type": "area-range","name": "area-range"
}
}
],};
const fusionDataStore = new FusionCharts.DataStore();
const fusionTable = fusionDataStore.createDataTable(graphData,schema);
this.variationOverTime.data = fusionTable;
我查看了 JSFiddle (https://jsfiddle.net/73xgmacm/249/) 上的另一个示例,试图将其合并到区域范围图中。目前这条线没有显示。我也没有看到任何可能有助于解决问题的错误。任何帮助将不胜感激!
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)