blob: 4ab005985b5a2471bf76653f78db164cae954186 [file] [log] [blame]
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
const range = (start, end) => new Array(end - start).fill(start).map((el, i) => start + i)
const shortMonth = [
1, 2, 3, 4, 5, 6
]
const monthVisitData = shortMonth.map(m => {
return {
'time': m,
'Value': Math.floor(Math.random() * 1000) + 200
}
})
const campaignData = [
{
value: 335,
name: 'Website'
},
{
value: 310,
name: 'Email'
},
{
value: 234,
name: 'Ads'
},
{
value: 135,
name: 'Video'
},
{
value: 1548,
name: 'Search'
}
]
const locationData = [
{
value: 50,
name: 'China'
},
{
value: 35,
name: 'USA'
},
{
value: 25,
name: 'EU'
},
{
value: 10,
name: 'Russia'
},
{
value: 10,
name: 'Other'
}
]
const StackMainData = [220, 182, 191, 234, 290, 330, 310, 123, 442, 321, 90, 149, 210, 122, 133, 334, 198, 123, 125, 220]
const StackData = StackMainData.map((item, key) => {
return {
'label': key + 'D',
'max': 500,
'sales': item
}
})
const SinData = range(1, 12).map(i => {
return {
'cate': 'Cat' + i,
'value': ((Math.sin(i / 5) * (i / 5 - 0.1) + i / 6) * 5)
}
})
export {
monthVisitData,
campaignData,
locationData,
StackData,
SinData
}