Skip to content
Snippets Groups Projects

Merge develop to main

Merged Aggarwal Himanshu requested to merge develop into main
1 file
+ 8
1
Compare changes
  • Side-by-side
  • Inline
export const cryptoChartOptions = (colors = [], dark = false) => {
export const cryptoChartOptions = (
colors = [],
dark = false,
animationsEnabled = false
) => {
return {
chart: {
toolbar: {
@@ -7,6 +11,9 @@ export const cryptoChartOptions = (colors = [], dark = false) => {
sparkline: {
enabled: true,
},
animations: {
enabled: animationsEnabled,
},
},
dataLabels: {
enabled: false,
@@ -65,6 +72,77 @@ export const cryptoChartOptions = (colors = [], dark = false) => {
};
};
export const cryptoLineChartOptions = (seriesData = [], color = "#3590F3") => {
return {
grid: {
bottom: 10,
right: 10,
top: 10,
left: 10,
},
xAxis: {
show: false,
type: "time",
silent: false,
splitLine: {
show: false,
},
splitArea: {
show: false,
},
},
yAxis: {
show: false,
type: "value",
splitArea: {
show: false,
},
splitLine: {
show: false,
},
min: "dataMin",
max: "dataMax",
},
series: [
{
type: "line",
data: seriesData,
name: "Solana",
smooth: true,
symbol: "none",
lineStyle: {
width: 3,
shadowOffsetY: -1,
color: color,
shadowColor: color,
shadowOffsetX: 0,
shadowBlur: 5,
cap: "round",
opacity: 1,
},
animation: false,
},
{
type: "scatter",
data: seriesData.slice(-1),
name: "ABC",
smooth: true,
symbol: "circle",
symbolSize: 20,
itemStyle: {
shadowOffsetY: 0,
color: color,
shadowColor: color,
shadowOffsetX: 0,
shadowBlur: 15,
opacity: 0.1,
},
animation: false,
},
],
};
};
export const cryptocurrencies = [
{
id: "bitcoin",
@@ -98,3 +176,56 @@ export const cryptocurrencies = [
name: "Cardano",
},
];
export const filterOptions = {
price: {
id: "price",
name: "Price",
options: {
equals: {
id: "equals",
name: "is",
},
less_than: {
id: "less_than",
name: "is less than",
},
greater_than: {
id: "greater_than",
name: "is greater than",
},
},
},
name: {
id: "name",
name: "Name",
options: {
equals: {
id: "equals",
name: "is",
},
less_than: {
id: "contains",
name: "contains",
},
},
},
price_change_percentage: {
id: "price_change_percentage",
name: "Price Change in %",
options: {
equals: {
id: "equals",
name: "is",
},
less_than: {
id: "less_than",
name: "is less than",
},
greater_than: {
id: "greater_than",
name: "is greater than",
},
},
},
};
Loading