我正在尝试使用 Echarts 创建条形图。我正在尝试反转 Y 轴。我试图显示的数据将较低的时间视为较高的分数,将较高的时间视为较低的分数。目前,图表显示时间越长得分越高。我在尝试反转 Y 轴时遇到问题。任何帮助都会很棒。
<script type="text/javascript">
var dom = document.getElementById("chartPace");
var myChart = echarts.init(dom);
app.title = 'Test';
option = {
color: ["#000000"],
responsive: true,
maintainAspectRatio: false,
grid : {
height: '250',
width: '450'
},
title : {
text: 'test'
},
xAxis : [
{
type : 'category',
data : ['Mon','Tue','Wensday','Tue','Wensday'],
axisTick: {
alignWithLabel: true
},
}
],
yAxis : [
{
type : 'time',
reversed:true,
axisLabel: {
formatter: function (value) {
var value = new Date(value);
var …Run Code Online (Sandbox Code Playgroud) 我试图编写一个程序,将文本文件中的单词转换为猪拉丁语.我得到了代替文本文件的单词的代码,但我现在很困难,试图解决它们.当我运行此代码时,它始终打印所有单词的第一个索引,而不是与if语句匹配的单词
void wordpro(string sent)
{
string word;
istringstream iss(sent, istringstream::in);
while (iss>> word)
if (word[0] == 'a'||'e'||'i'||'o'||'u'||'A'||'E'||'I'||'O'||'U')
{
cout<< word[0] <<endl;
}
}
Run Code Online (Sandbox Code Playgroud)