2014-02-21 2 views
1

아래 예제 딤플 차트의 변형을 사용하여 어떻게 차트의 높이와 너비를 하드 코딩하지 않고도 Shiny 부트 스트랩으로 자동 스케일링 할 수 있습니까?반짝이는 rcharts 딤플 버블 차트

#get data used by dimple for all of its examples as a first test 
data <- read.delim(
    "http://pmsi-alignalytics.github.io/dimple/data/example_data.tsv" 
) 

#eliminate . to avoid confusion in javascript 
colnames(data) <- gsub("[.]","",colnames(data)) 


#example 27 Bubble Matrix 
d1 <- dPlot(
    x = c("Channel", "PriceTier"), 
    y = "Owner", 
    z = "Distribution", 
    groups = "PriceTier", 
    data = data, 
    type = "bubble", 
    aggregate = "dimple.aggregateMethod.max" 
) 
d1$xAxis(type = "addCategoryAxis") 
d1$yAxis(type = "addCategoryAxis") 
d1$zAxis(type = "addMeasureAxis", overrideMax = 200) 
d1$legend(
    x = 200, 
    y = 10, 
    width = 500, 
    height = 20, 
    horizontalAlign = "right" 
) 
d1 

답변

4

안녕하세요이 같은 dplot()width="100%"을 추가해야한다

d1 <- dPlot(
    x = c("Channel", "PriceTier"), 
    y = "Owner", 
    z = "Distribution", 
    groups = "PriceTier", 
    data = data, 
    type = "bubble", 
    aggregate = "dimple.aggregateMethod.max", 
    width="100%" 
) 
이 응답에 대한 너무 많은
+0

감사; 최첨단을 원한다면 https://github.com/timelyportfolio/rCharts/tree/dimple_layer에서 새로운 모든 딤플 기능을 통합하려고합니다. 다음은 http://bl.ocks.org/timelyportfolio/8869959의 예입니다. 나는 생각이나 생각을 좋아할 것입니다. – timelyportfolio

+0

위대한 작품! 매우 흥미 롭습니다. 그래프는 놀랍습니다. 내가 아이디어가 있다면 알려주지. – Victorp

+0

포인터 @ Victorp 주셔서 감사합니다. 나는 JQuery와 Bootstrap을 사용하여 더 깊이 이해할 수있었습니다. 가장 큰 고통은 고정 된 치수이지만 부트 스트랩이있는 스 캐 폴딩은 매우 유용합니다. – digdeep