A script should be enqueued and localized only one time per page; so, what you describe is the correct behaviour. I think you are confusing localizing a script with printing inline JavaScript. Also, enqueuing and localizing should be done in wp_enqueue_scripts
action.
You need to think in a different approach.
For example (just a example), you could use dataset API:
First, enqueue the script:
add_action( 'wp_enqueue_scripts', 'cyb_enqueue_scripts' );
function cyb_enqueue_scripts() {
wp_enqueue_script( 'ada_chart_handle', plugins_url().'/ada-chart/js/ada-chart1.js' );
}
Second, use the data atribute to include the cid
value:
add_shortcode( 'ada_chart', 'ada_chart_stranka' );
function ada_chart_stranka ($atts) {
$a = shortcode_atts( array(
'cid' => '',
), $atts );
$cislo_chart = $a['cid'];
return '<div data-cid="' . $cislo_chart . '"></div>';
}
Third, write JavaScript that use dataset API to read the data-cid attribute and perform the desired action:
// Get all elements with data-cid attribute
var a = document.querySelectorAll('[data-cid]');
// Loop over all selected elements
for (var i in a) if (a.hasOwnProperty(i)) {
// Get the value of data-cid attribute for current element in the loop
var cid = a[i].getAttribute('data-cid');
// Do something with the cid value
}