저는 Graphist를하기 위해 Chartist를 사용하여 Framework7에 작은 애플리케이션을 구축하고 있습니다. 예를 들어, 나는 이것에 대한 간단한 설명을 만들었다. 여기에서 볼 수 있습니다 : 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입니다 : 여기
은 자바 스크립트의 차티스트와
<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>
감사합니다. @Keno! 이러한 CSS 옵션은 올바르지 만 차트 작성 후 적용 할 때만 사용할 수 있습니다. 나는 그것들을 적용하기 위해'.on ('created'비트)을 사용해야 만했다. 나는 그래프가 높이로 설정 되었기 때문에 100 %라고 생각한다. 그러나 이제는 작동 중이다. –