created()
или mounted()
[1,2],[3,4],[5,6]
вам надо их разделить на два таких: [1,3,5],[2,4,6]
и вывести их на диаграмме. Ваша проблема решается в данном вопросе например, можете посмотреть. if (st <= 1 ) s2="class='r3'";
{!! $text !!}
store.field = value
/**
* Method to send reply to current comment
*
*/
sendReply() {
let comment = this.comment;
let message = this.reply;
this.replyMessage({comment,message});
},
/**
* Method to get all comments from state
*
* @param object comment
* @param string message
* @return void
*/
async reply({commit,rootGetters}, {comment, message}) {
axios
.post(`/api/comment/${comment.id}/reply`,{
comment: message,
type: 'comment',
commentable_id: comment.commentable_id,
api_token: rootGetters['user/getAuthUser'].api_token
})
.then( response => {
let data = response.data.comment;
commit('ADD_REPLY',{comment,data});
})
.catch(error => {
for (const [key, value] of Object.entries(error.response.data.error.message)) {
commit('ADD_ERROR_MESSAGE',value);
};
});
ADD_REPLY(state,{comment_id,data}) {
state.comments.flatMap(comment => comment.replies).find(c => c.id === comment_id).replies.unshift(data);
},
$_SESSION[$_GET['order']];