Diff
checker
テキスト
テキスト
画像
ドキュメント
Excel
フォルダ
Legal
Enterprise
デスクトップ
料金
ログイン
Diffchecker デスクトップのダウンロード
テキスト比較
2 つのテキスト ファイルの違いを見つける
ツール
履歴
ライブエディター
空白の変更を非表示
未変更行を折りたたむ
折り返しなし
レイアウト
分割
統合
比較精度
スマート
単語
文字
テキストスタイル
外観を変更
シンタックスハイライト
構文を選択
無視
テキスト変換
最初の差分へ移動
入力を編集
Diffchecker Desktop
Diffcheckerを実行する最も安全な方法。Diffchecker Desktopアプリを入手:あなたの差分はコンピューターから出ることはありません!
Desktopを入手
Untitled diff
作成日
9 年前
差分は期限切れになりません
クリア
エクスポート
共有
説明
13 削除
行
合計
削除
文字
合計
削除
この機能を引き続き使用するには、アップグレードしてください
Diff
checker
Pro
価格を見る
80 行
すべてコピー
15 追加
行
合計
追加
文字
合計
追加
この機能を引き続き使用するには、アップグレードしてください
Diff
checker
Pro
価格を見る
82 行
すべてコピー
const { VictoryChart, VictoryBar,VictoryPie ,
const { VictoryChart, VictoryBar,VictoryPie ,
VictoryAxis, VictoryLegend, VictoryLabel ,VictoryTheme} = Victory;
VictoryAxis, VictoryLegend, VictoryLabel ,VictoryTheme} = Victory;
const colors = [
const colors = [
'#F56D00', '#9F3AB7', '#64CCE9', '#32120A',
'#F56D00', '#9F3AB7', '#64CCE9', '#32120A',
'#F8984C', '#BB75CC', '#92DBEF', '#6F5953',
'#F8984C', '#BB75CC', '#92DBEF', '#6F5953',
'#FABD8C', '#D4A6DE', '#B9E8F5', '#A39491']
'#FABD8C', '#D4A6DE', '#B9E8F5', '#A39491']
class DonutChart extends React.Component {
class DonutChart extends React.Component {
static propTypes = {
static propTypes = {
data: PropTypes.arrayOf(PropTypes.object).isRequired,
data: PropTypes.arrayOf(PropTypes.object).isRequired,
width: PropTypes.number.isRequired,
width: PropTypes.number.isRequired,
height: PropTypes.number.isRequired,
height: PropTypes.number.isRequired,
innerRadius: PropTypes.number.isRequired
innerRadius: PropTypes.number.isRequired
}
}
render() {
render() {
let { data, innerRadius, width, height } = this.props
let { data, innerRadius, width, height } = this.props
const colorScale = colors.slice(0, data.length)
const colorScale = colors.slice(0, data.length)
const total = data.reduce((a, b) => ({ y: a.y + b.y }))
const total = data.reduce((a, b) => ({ y: a.y + b.y }))
コピー
コピー済み
コピー
コピー済み
const viewBox = `0 0 ${width} ${height}`
const legendDataWithStyle = data.map((dateItem, index) => {
const legendDataWithStyle = data.map((dateItem, index) => {
return { name : dateItem.x, symbol: { fill: colors[index], type: "square" } }
return { name : dateItem.x, symbol: { fill: colors[index], type: "square" } }
}
}
)
)
return (
return (
<div style={{ width: width + 100, height: height + 100 }} >
<div style={{ width: width + 100, height: height + 100 }} >
コピー
コピー済み
コピー
コピー済み
<svg
viewBox={viewBox
}>
<svg
width={width + 100} height={height
}>
<VictoryPie
<VictoryPie
standalone={false}
standalone={false}
width={width} height={height}
width={width} height={height}
data={data}
data={data}
innerRadius={innerRadius}
innerRadius={innerRadius}
colorScale={colorScale}
colorScale={colorScale}
/>
/>
<VictoryLabel
<VictoryLabel
textAnchor="middle"
textAnchor="middle"
style={{ fontSize: 20 }}
style={{ fontSize: 20 }}
x={width / 2} y={height / 2}
x={width / 2} y={height / 2}
text={total.y}
text={total.y}
/>
/>
コピー
コピー済み
コピー
コピー済み
<g transform="translate(40,0)">
<VictoryLegend x={width} y={30}
title="Totals"
centerTitle
orientation="vertical"
gutter={20}
style={{
title: { fontSize: 15 }
}}
data={legendDataWithStyle}
standalone={false}
/>
</g>
コピー
コピー済み
コピー
コピー済み
<VictoryLegend x={width - 50} y={30}
title="Totals"
centerTitle
orientation="vertical"
gutter={20}
style={{
title: { fontSize: 15 }
}}
data={legendDataWithStyle}
standalone={false}
/>
</svg>
</svg>
</div>
</div>
)
)
}
}
}
}
const dounutData = [
const dounutData = [
{ x: 'a', y: 1 }, { x: 'b', y: 2 }, { x: 'c', y: 3 },
{ x: 'a', y: 1 }, { x: 'b', y: 2 }, { x: 'c', y: 3 },
{ x: 'd', y: 4 }, { x: 'e', y: 2 }, { x: 'f', y: 6 }
{ x: 'd', y: 4 }, { x: 'e', y: 2 }, { x: 'f', y: 6 }
];
];
ReactDOM.render(
ReactDOM.render(
<DonutChart data={dounutData} width={300} height={300}
<DonutChart data={dounutData} width={300} height={300}
innerRadius={68} />,
innerRadius={68} />,
document.getElementById('container')
document.getElementById('container')
);
);
保存された差分
原文
ファイルを開く
const { VictoryChart, VictoryBar,VictoryPie , VictoryAxis, VictoryLegend, VictoryLabel ,VictoryTheme} = Victory; const colors = [ '#F56D00', '#9F3AB7', '#64CCE9', '#32120A', '#F8984C', '#BB75CC', '#92DBEF', '#6F5953', '#FABD8C', '#D4A6DE', '#B9E8F5', '#A39491'] class DonutChart extends React.Component { static propTypes = { data: PropTypes.arrayOf(PropTypes.object).isRequired, width: PropTypes.number.isRequired, height: PropTypes.number.isRequired, innerRadius: PropTypes.number.isRequired } render() { let { data, innerRadius, width, height } = this.props const colorScale = colors.slice(0, data.length) const total = data.reduce((a, b) => ({ y: a.y + b.y })) const viewBox = `0 0 ${width} ${height}` const legendDataWithStyle = data.map((dateItem, index) => { return { name : dateItem.x, symbol: { fill: colors[index], type: "square" } } } ) return ( <div style={{ width: width + 100, height: height + 100 }} > <svg viewBox={viewBox}> <VictoryPie standalone={false} width={width} height={height} data={data} innerRadius={innerRadius} colorScale={colorScale} /> <VictoryLabel textAnchor="middle" style={{ fontSize: 20 }} x={width / 2} y={height / 2} text={total.y} /> <VictoryLegend x={width - 50} y={30} title="Totals" centerTitle orientation="vertical" gutter={20} style={{ title: { fontSize: 15 } }} data={legendDataWithStyle} standalone={false} /> </svg> </div> ) } } const dounutData = [ { x: 'a', y: 1 }, { x: 'b', y: 2 }, { x: 'c', y: 3 }, { x: 'd', y: 4 }, { x: 'e', y: 2 }, { x: 'f', y: 6 } ]; ReactDOM.render( <DonutChart data={dounutData} width={300} height={300} innerRadius={68} />, document.getElementById('container') );
変更されたテキスト
ファイルを開く
const { VictoryChart, VictoryBar,VictoryPie , VictoryAxis, VictoryLegend, VictoryLabel ,VictoryTheme} = Victory; const colors = [ '#F56D00', '#9F3AB7', '#64CCE9', '#32120A', '#F8984C', '#BB75CC', '#92DBEF', '#6F5953', '#FABD8C', '#D4A6DE', '#B9E8F5', '#A39491'] class DonutChart extends React.Component { static propTypes = { data: PropTypes.arrayOf(PropTypes.object).isRequired, width: PropTypes.number.isRequired, height: PropTypes.number.isRequired, innerRadius: PropTypes.number.isRequired } render() { let { data, innerRadius, width, height } = this.props const colorScale = colors.slice(0, data.length) const total = data.reduce((a, b) => ({ y: a.y + b.y })) const legendDataWithStyle = data.map((dateItem, index) => { return { name : dateItem.x, symbol: { fill: colors[index], type: "square" } } } ) return ( <div style={{ width: width + 100, height: height + 100 }} > <svg width={width + 100} height={height}> <VictoryPie standalone={false} width={width} height={height} data={data} innerRadius={innerRadius} colorScale={colorScale} /> <VictoryLabel textAnchor="middle" style={{ fontSize: 20 }} x={width / 2} y={height / 2} text={total.y} /> <g transform="translate(40,0)"> <VictoryLegend x={width} y={30} title="Totals" centerTitle orientation="vertical" gutter={20} style={{ title: { fontSize: 15 } }} data={legendDataWithStyle} standalone={false} /> </g> </svg> </div> ) } } const dounutData = [ { x: 'a', y: 1 }, { x: 'b', y: 2 }, { x: 'c', y: 3 }, { x: 'd', y: 4 }, { x: 'e', y: 2 }, { x: 'f', y: 6 } ]; ReactDOM.render( <DonutChart data={dounutData} width={300} height={300} innerRadius={68} />, document.getElementById('container') );
違いを見つける