Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <div id="viz"></div>
              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css2?family=Yomogi&display=swap');
              
            
!

JS

              
                new roughViz.Bar({
  element: "#viz",
  data: {
      labels: ['a', 'b'], 
      values: [10, 20],
  },
  axisFontSize:"2rem", //ラベル値の文字サイズ '1rem'
  axisRoughness:0.5,  //軸の手書きの度合い 0.5
  axisStrokeWidth:0.5,  //軸の線の太さ 0.5
  bowing:0.5,  //軸の歪み 0
  color:'pink',  //バーの色 'skyblue' ※1色のみ
  fillStyle:'hachure',  //バーの塗りつぶしパターン
  fillWeight:0,  //バーの塗りつぶしの度合い 0.5
  font:'Yomogi', //使用するフォントファミリ
  highlight:'red', //ホバーした時の色 'coral'
  innerStrokeWidth:1, //バーの塗りつぶしの間隔 1
  interactive:true,  //チャートがインタラクティブかどうか true
  margin:{
    top:50,
    right:30,
    bottom:100,
    left:100
  }, //マージンオブジェクト {top: 50, right: 20, bottom: 70, left: 100}
  padding:0.5, //バー間のパディング 0.1
  roughness:5, //チャートの粗さレベル 1
  simplification:0.5, //グラフの簡略化 0.2
  stroke:'blue', //バーのストロークの色 black
  strokeWidth:1, //バーのストロークのサイズ 1
  title: "テストの棒グラフ", //チャートのタイトル
  titleFontSize:'1.2rem', //タイトルのフォントサイズ '1rem'
  tooltipFontSize:'2rem', //ツールチップのフォントサイズ '0.95rem'
  xLabel:"Xラベル",
  yLabel:"Yラベル",
  labelFontSize:'1.2rem',  //ラベル値の文字サイズ '1rem'
});
              
            
!
999px

Console