GitHub user user1500177 added a comment to the discussion: Superset Genral
Doubt version 6
ok when i tried to do the same , the superset application itslef is not loading
,
I want to specifically introduce the following sort of chart what all chages
from scratch i should be making ?
Example for one chart i need to bring into the Superset :
The below change is like Another one that is needed : a new type of line chart
lets say for example
Chart 1 :
```
option = {
xAxis: {
type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
},
yAxis: {
type: 'value'
},
series: [
{
data: [820, 932, 901, 934, 1290, 1330, 1320],
type: 'line',
smooth: true
}
]
};
```
Are these DOABL , can u give me example IN THE MANNER I SHOULD proceed by
seeing such .js or .tsx CODE and then incorporating the same to SUPERSET
properly so that the data from db is shown - and properl integartion occurs
The below one is like a geo chart
```
function createChart() {
var chRoughLatitude = 47;
option = {
title: {
text: 'Travel Routes'
},
geo: {
map: 'ch',
roam: true,
aspectScale: Math.cos((chRoughLatitude * Math.PI) / 180),
// nameProperty: 'name_en', // If using en name.
label: {
show: true,
textBorderColor: '#fff',
textBorderWidth: 2
}
},
tooltip: {},
series: [
{
type: 'graph',
coordinateSystem: 'geo',
data: [
{ name: 'a', value: [7.667821250000001, 46.791734269956265] },
{ name: 'b', value: [7.404848750000001, 46.516308805996054] },
{ name: 'c', value: [7.376673125000001, 46.24728858538375] },
{ name: 'd', value: [8.015320625000001, 46.39460918238572] },
{ name: 'e', value: [8.616400625, 46.7020608630855] },
{ name: 'f', value: [8.869981250000002, 46.37539345234199] },
{ name: 'g', value: [9.546196250000001, 46.58676648282309] },
{ name: 'h', value: [9.311399375, 47.182454114178896] },
{ name: 'i', value: [9.085994375000002, 47.55395822835779] },
{ name: 'j', value: [8.653968125000002, 47.47709530818285] },
{ name: 'k', value: [8.203158125000002, 47.44506909144329] }
],
edges: [
{
source: 'a',
target: 'b'
},
{
source: 'b',
target: 'c'
},
{
source: 'c',
target: 'd'
},
{
source: 'd',
target: 'e'
},
{
source: 'e',
target: 'f'
},
{
source: 'f',
target: 'g'
},
{
source: 'g',
target: 'h'
},
{
source: 'h',
target: 'i'
},
{
source: 'i',
target: 'j'
},
{
source: 'j',
target: 'k'
}
],
edgeSymbol: ['none', 'arrow'],
edgeSymbolSize: 5,
lineStyle: {
color: '#718adbff',
opacity: 1
}
}
]
};
myChart.setOption(option);
}
function fetchGeoJSON() {
myChart.showLoading();
$.get(ROOT_PATH + '/data/asset/geo/ch.geo.json', function (geoJSON) {
echarts.registerMap('ch', geoJSON);
createChart();
myChart.hideLoading();
});
}
fetchGeoJSON();
```
GitHub link:
https://github.com/apache/superset/discussions/41663#discussioncomment-17701194
----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]