私はChart7を使っていくつかのグラフを作成するために、Framework7に小さなアプリケーションを構築しています。一例として、私はこれのjsfiddleを作成しました。 https://jsfiddle.net/emergingdzns/hpr6u8uk/1/Chartistの長いラベルのためのスペース
問題(この例でわかるように)は、縦線の長いラベルが途切れてしまうことがあります。それを修正する方法はありますか?ここで
// Initialize your app
var myApp = new Framework7();
// Export selectors engine
var $$ = Dom7;
var dataChart1 = [
26400,
50500,
73200,
101100
];
new Chartist.Bar('#coveredChart', {
labels: ['1. Everyone has to have health insurance.',
'2. People can choose to have - or not have - health insurance.',
'3. People with pre-existing conditions are excluded.',
'4. Of those with health insurance, one becomes ill.'
],
series: [dataChart1]
});
はHTMLです:ここで
はjavascriptのだチャーティストと
<div class="views">
<!-- Your main view, should have "view-main" class-->
<div class="view view-main">
<!-- Top Navbar-->
<div class="navbar">
<div class="navbar-inner">
<!-- We have home navbar without left link-->
<div class="center sliding">ClareFolio</div>
</div>
</div>
<!-- Pages, because we need fixed-through navbar and toolbar, it has additional appropriate classes-->
<div class="pages">
<!-- Page, data-page contains page name-->
<div data-page="covered" class="page">
<!-- Scrollable page content-->
<div class="page-content">
<br>
<div class="content-block-title" style="text-align:center;">Example chart below</div>
<div class="content-block">
<div class="content-block-inner">
<div class="chart">
<div id="coveredChart" class="ct-chart ct-golden-section"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
Thanks @Keno!これらのCSSオプションは正しいものの、チャートが作成された後に適用された場合にのみ機能するようにすることができました。私は '.on( 'created'ビットを使ってそれを適用しなければなりませんでした。グラフは高さ:100%に設定されていると思います。 –