Telerik Forums
KendoReact Forum
1 answer
76 views

Is it possible to have two X axis, one on the top, and one on the bottom?

I'm aware you can have 2 Y axis, but how would you go about doing it for X axis?

Filip
Telerik team
 answered on 22 Mar 2022
1 answer
118 views

Hello,

 

I'm having trouble using the onblur in an input because it is not being triggered on loosing focus of the element but on change of the data entered. My code is below for further referene, I was thinking may be the validator is triggering this behavior? some help would be appreciated.

 

const MyContext = React.createContext({
  updateCompNickname: (value: any) => { },
  updateCompSerialNo: (value: any) => { },
  postCompressorSave: (value: any) => { }
});
/**
* Validator
*/
const inputRegex = new RegExp(/^([a-zA-Z\d\.,%/\-_ ].*)/);
const inputValidator = (value: any) => inputRegex.test(value) ? "" : "Please enter a valid value.";
const NicknameInput = (fieldRenderProps: any) => {
  const { validationMessage, visited, onChange, ...others } = fieldRenderProps;
  const currentContext = React.useContext(MyContext);
  return (
    <div>
      <label htmlFor="nickname-name" className="text-info, label-add-compressors">Nickname</label>
      <Input type="text" name="nickname" placeholder=""
        style={{ height: "30px" }}
        onBlur={currentContext.postCompressorSave}
        onChange={e => {
          fieldRenderProps.onChange(e) // call the Form onChange and then execute any custom logic
          currentContext.updateCompNickname(e.value);
        }}
        {...others} />
      {visited && validationMessage && <Error>{validationMessage}</Error>}
    </div>
  );

};

constAddCompData = () => {

  return (
    <div >
      {<MyContext.Provider
        value={{
          updateCompNickname: updateCompNickname,
          updateCompSerialNo: updateCompSerialNo,
          postCompressorSave: postCompressorSave
        }}
      >
<fieldset className={"k-form-fieldset"}>
                <div className="mb-3">
                  <Field
                    name={"nickname"}
                    component={NicknameInput}
                    validator={inputValidator}
                  />
                </div>
    </div>
  )
}
export default AddCompData
Stefan
Telerik team
 answered on 22 Mar 2022
1 answer
228 views

Hi.

I use the Day, Week and Month view in the Scheduler component. Unfortunatley the component doesn't support a year view which I need so I would like to include that myself from a different source. Question: Is it possible to add a "Year" button to the Scheduler buttons (see screenshot) that would show a custom component in the Scheduler view port when pressed?

Thanks!

Bernd

 

Filip
Telerik team
 answered on 21 Mar 2022
1 answer
206 views

I use the sidebar toggle but why does the kendo reaction chart always break or leave a space if the sidebar is enabled or closed

please give me a solution or code sample

Konstantin Dikov
Telerik team
 answered on 21 Mar 2022
1 answer
67 views
0

I am trying to display a scatterplot from a variable called datadata should contain the x and y values for the scatterplot. The method below is what I am attempting to do to insert the x and y values, however the graph is showing up blank.


let data = []
for(var i = 0; i < sixth_x.length; ++i){

  data.push({xField: sixth_x[i], yField: sixth_y[i]})

}

x is a string, and y is a number. I realize that x is non-numeric, although upon converting to an int, it still fails to display on a scatterplot. Any suggestions would be helpful

This is my method to display the graph


  <ChartSeriesItem type="scatter" data={data} xField="sixth_x"
    yField="sixth_y"/>
</ChartSeries>
Filip
Telerik team
 answered on 18 Mar 2022
1 answer
56 views
how can generate drawer item route for add/edit page and list page.please any one can explain me
Filip
Telerik team
 answered on 18 Mar 2022
1 answer
128 views

Category axis plot bands start behaving strangely when you zoom a chart by increasing the min prop of ChartCategoryAxisItem. Category plot bands are essentially broken if you're setting the min prop to a non-zero value.

https://stackblitz.com/edit/react-zaswls?file=app/main.tsx

This is a version of the first example at https://www.telerik.com/kendo-react-ui/components/charts/chart/elements/plot-bands/ that has been edited to show the problem. When ChartCategoryAxisItem min is set to 5 and max is set to 10, the category plot band from 8 to 10 should be visible, yet it's not.


Stefan
Telerik team
 answered on 18 Mar 2022
1 answer
758 views
how to remove vertical gridline in kendo react chart?
please give me an example
Konstantin Dikov
Telerik team
 answered on 17 Mar 2022
1 answer
262 views

Hi Team,

I want to display radio button in grid row using kendo react grid. i could see checkbox option but not radio button. can you suggest?

Stefan
Telerik team
 answered on 17 Mar 2022
1 answer
66 views

I have a Scheduler component on my page that uses a custom SchedulerEditItem to display the events. Every time I click on any Scheduler item that is not a allDay item, the allDay items get resized the height becomes 2 px bigger. In the screenshot you can see the allDay-Rows that are filled are bigger than the others. That's because I clicked multiple times on any scheduler items.

In the Scheduler component I have set the editable options like so:

editable={{
     add: true,
     remove: false,
     drag: false,
     resize: false,
     select: false,
     edit: true,
}}


Previously I also had the "select" option set to true and that caused the allDay items to resize even when I clicked anywhere in the scheduler, so also on the empty slots the same behavior was showing. It also doesn't help if I either set the slot height or the height in the styling of the SchedulerEditItems that have the isAllDay property set to true. Unfortunately my app is much to big to copy it somewhere to be able to troubleshoot the behavior. So I'll just put here the configuration of the Scheduler and the SchedulerEditItem to start the discussion.


<Scheduler
	data={calendarData}
	defaultDate={displayDate}
	height={400}
	header={(props) => <React.Fragment />}
	footer={(props) => <React.Fragment />}
	timezone="CET"
	slot={CustomSlot}
	onDataChange={handleDataChange}
	editable={{
		add: true,
		remove: false,
		drag: false,
		resize: false,
		select: false,
		edit: true,
	}}
	editItem={CalendarProfileItem}
	form={
		isColumnEmpty
			? NewProfileForm
			: EditProfileForm
	}
>
	<WeekView
		title="Full Week"
		workWeekStart={Day.Monday}
		workWeekEnd={Day.Friday}
		showWorkHours={false}
		workDayStart="06:00"
		workDayEnd="19:00"
		dateHeaderCell={CustomDateHeaderCell}
		slotDivisions={1}
	/>
</Scheduler>

 

        <SchedulerEditItem
            {...props}
            ref={item}
            title={title}
            description={props.dataItem.description}
            onDoubleClick={onSchedulerItemDoubleClick}
            startTimezone={'CET'}
            endTimezone={'CET'}
            showOccurrenceDialog={false}
            style={{
                ...props.style,
                backgroundColor:
                    props.dataItem.color || GLOBALS.STANDARD_JOB_COLOR,
                color: getContrastYIQ(
                    props.dataItem.color || GLOBALS.STANDARD_JOB_COLOR
                ),
                height: props.dataItem.isAllDay ? '35px' : undefined,
            }}
            vertical={true}
        >
        </SchedulerEditItem>

 

Stefan
Telerik team
 answered on 16 Mar 2022
Narrow your results
Selected tags
Tags
+? more
Top users last month
Henri
Top achievements
Rank 2
Iron
Iron
Iron
SUNIL
Top achievements
Rank 2
Iron
Iron
Iron
David
Top achievements
Rank 1
Jackson
Top achievements
Rank 1
Iron
Iron
Tim
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Henri
Top achievements
Rank 2
Iron
Iron
Iron
SUNIL
Top achievements
Rank 2
Iron
Iron
Iron
David
Top achievements
Rank 1
Jackson
Top achievements
Rank 1
Iron
Iron
Tim
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?