Question: I want to embed my chart from Apache Superset into my React.js App.
So far I know there is possibility to use like this:

```
<iframe
        id="myIFRAME"
        width="1600"
        height="1200"
        seamless
        frameBorder="10"
        scrolling="no"
        src="http://localhost:8080/r/3"
      >
</iframe>

```

It works fine but I want to use only a chart with filter options without all the superset dashbord pane:
[![enter image description here](https://i.stack.imgur.com/l524D.png)](https://i.stack.imgur.com/l524D.png)

I was trying to use <https://www.npmjs.com/package/@superset-ui/core> but there is no good documentation how to use it and it require to downgrade react version to 16, while I think in my project will be better newer version.

Currently I am trying to manipulate things inside iframe by catching things by

```
var iframe = document.getElementById("myIFRAME");
  var elmnt = iframe.contentWindow.document.getElementsByClassName(
    "dashboard-content css-185d7vi"
  );
   elmnt.style.display = "none";

```

But i think it's not a good way to do this and Im getting errors with `CORS` and `Consider adding an error boundary to your tree to customize error handling behavior.`

Answer: 
You can generate a consistent `n` random samples by updating the `seed` of `random` before `shuffle`. Here is an example on how to generate these list of names (10 samples):

```py
import random, copy

sorted_list = ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']
i = 0 #counter
n = 10 # number of samples
l = 4 # length of samples

myset = set()
while i < n:
    shuffled_list = copy.deepcopy(sorted_list)
    random.seed(i)
    random.shuffle(shuffled_list)
    name = tuple(shuffled_list[:l])
    if name not in myset:
        myset.add(name)
        i+=1
print(sorted([''.join(list(x)) for x in myset]))
# ['CKEM', 'DURP', 'GQXO', 'JFWI', 'JNRX', 'MNSV', 'OAXS', 'TIFX', 'VLZS', 'XYLK']

```

Then you can randomly generate `n` number of prices and create a `list` of `tuple`s that binds each name to a price:

```py
names = sorted([''.join(list(x)) for x in myset])
int_list = random.sample(range(1, 100), n)
prices = [x/10 for x in int_list]

names_and_prices = []
for name, price in zip(names,prices):
    names_and_prices.append((name,price))

# [('CKEM', 1.5), ('DURP', 1.7), ('GQXO', 6.5), ('JFWI', 7.6), ('JNRX', 0.9), ('MNSV', 8.9), ('OAXS', 5.0), ('TIFX', 9.6), ('VLZS', 1.4), ('XYLK', 3.8)]

```
Try:

```
import string
import random

def stock_generator(num):
    names = []

    for n in range(num):
        x = ''.join(random.choices(string.ascii_uppercase, k=4))
        names.append(x)

    return names    
print(stock_generator(100))

```

Each time you will call the function stock\_generator using a number of your choice as parameter, you'll generate the stock name you need.