Telerik Forums
KendoReact Forum
1 answer
373 views

Hi,

I see that the maxDivisions work for dates (category axis documentation) on the CategoryAxis, how about for ints?

My data is like this: 

[{period: 1, value: 2}, {period: 2, value 5},...]

I have a chart with about 360 "categories", using this code I still receive the below graph... How can I use divisions for the category axis of ints or is there another solution?

          <Chart>
            <ChartSeries>
              <ChartSeriesItem
                renderAs={"canvas"}
                data={curveValues}
                type="line"
                field="value"
                markers={{ visible: false }}
                categoryField="period"
              />
            </ChartSeries>
            <ChartCategoryAxis>
              <ChartCategoryAxisItem maxDivisions={30} />
            </ChartCategoryAxis>
            <ChartTooltip format="{0}" />
          </Chart>

Konstantin Dikov
Telerik team
 answered on 29 Oct 2021
1 answer
184 views

Hello

 

I am working agains AWS and it is a two step uploading, one first call to get the url where I have to upload and one second call to upload the file onto that url. I need to access the on click method before the upload uploads in order to get the url where i can upload the file.

 

Some help would be appreciated.

 

kind regards,

Konstantin Dikov
Telerik team
 answered on 28 Oct 2021
1 answer
202 views

Hello,

 

I cannot find an example of the upload with credentials where I can pass an authorization token in the header of the request, some help would be appreciated.

https://www.telerik.com/kendo-react-ui/components/upload/credentials/

 

Thanks,

Stefan
Telerik team
 answered on 28 Oct 2021
1 answer
150 views

for some reason when you zoom the page columns and headers scale differently which leads to slight shift for columns(last column has the biggest shift)

the bigger zoom the bigger shift, is there any way to fix that or what can cause this issue?

Stefan
Telerik team
 answered on 28 Oct 2021
1 answer
149 views

Hello,

We are implementing the dropdown from this example:https://www.telerik.com/kendo-react-ui/components/dropdowns/dropdownlist/

But setting the same array of fields with useState but we get the error "Typeerror: data.findindex is not a function" , the code is below, some get would be very appreciated.

  useEffect(()=>{
    fetchCompModelData()

  }, [])

 

constfetchCompModelData = async () => { 

  try{
    const uniqueItemsModel = uniqueElementModel(result.data);
    setCompModelData(uniqueItemsModel);
    debugger
  }catch(err){
    console.log("AXIOS ERROR"err.message);
  }

}

const uniqueElementModel = async (arr=> {  
  const datatest =  ["test",
  "GA 315",
  "V320TS",
  "RS200n-W115",
  "RS110IE-A110",
  "RS110IE-A125"];  
  return datatest
}
const [compModelDatasetCompModelData] = useState([])

return (

          <div>
           
           <div className="mb-3">
                  <label htmlFor="brand-name" className="text-info"> Model </label>
                  <DropDownList 
                      data={compModelData}
                    />  
          

</div>

      </div>        
  )
}
Konstantin Dikov
Telerik team
 answered on 27 Oct 2021
1 answer
622 views

Hi ,

do you have an example of pages and select all

when the onHeaderSelectionChange  event -  select all the items in all pages in grid?

 

in the documention  of  selection - 

the example below , selected all in current page only

 const onHeaderSelectionChange = React.useCallback((event) => {
    const checkboxElement = event.syntheticEvent.target;
    const checked = checkboxElement.checked;
    const newSelectedState = {};
    event.dataItems.forEach((item) => {
      newSelectedState[idGetter(item)] = checked;
    });
    setSelectedState(newSelectedState);
  }, []);

 

thanks!


Filip
Telerik team
 answered on 27 Oct 2021
1 answer
219 views

Hi all, 

I need to add the capability to drag something from a Grid to a TreeList.

As far as my research has taken me, this is not available out of the box.

Can anybody advise me on strategies to make this work?

Thanks!

Sean P

Konstantin Dikov
Telerik team
 answered on 27 Oct 2021
0 answers
98 views

Hi,

We're exporting a page to pdf that includes several chart svgs. When the pdf is opened in Chrome, the svgs include a thin drop shadow on the right and bottom of each chart, but when opened in Preview this shadow doesn't appear. We've dug pretty deep into the css and svg data and can't find any potential causes; other svgs (our logo, etc.) export fine. Any idea how we can address the discrepancy between views?

Thanks!

 

Daniel
Top achievements
Rank 1
 updated question on 25 Oct 2021
1 answer
124 views

Hi,

I need to know how do i get details of the cell (both row details and column details)in pivot grid as im using kendo-pivotgrid-react-wrapper please explain me with any examples as soon as possible.Thanks in advance

Stefan
Telerik team
 answered on 22 Oct 2021
1 answer
122 views

 

Hello,

 

Im using the validation form fields but for some reason my state is not being updated after I enter valid data, on form submission the inputs are all null even thought I had entered valid data. some help would be greatly appreciated. Part of the code is below

 

 

  

 

 const data = {
    manufacturer_id: parseInt(manufacturerId)||null,
    comp_model: compModel||null
    comp_type_id: parseInt(compTypeId)||null,
    comp_nickname: compNickname||null,
    comp_serial_no: compSerialNo||null,
    comp_pressure: parseFloat(compPressure)||null,
    comp_pressure_unit: compPressureUnit.id||null,
    comp_regulation: compRegulation.id||null,
    comp_cooling: compCooling.id||null,
    comp_year: compYear.text||null,
    comp_power_supply: compPowerSupply.id||null,
    comp_power_supply_unit: null,
    comp_motor_power: parseInt(compMotorPower)||null,
    comp_motor_power_unit: compMotorPowerUnit.id||null,
    comp_output: parseFloat(compOutput)||null,
    comp_output_unit: compOutputUnit.id||null,
    real_comp_data_id: idCreatedCompressor
  } 
 
  /**
  * Function to save Compressor Data.
  * Error message will save in the 'message' state.
  */
  const postCompressorSave = async (e=> {  
    debugger;
    const isEmpty = Object.values(data).every(x => x === null || x === '');
    if(isEmpty) {
      return;
    }
    if(idCreatedCompressor !== "") {
      postCompressorUpdate();  
      return;
    }
    const dataWithStatus = {...datadata_status_flow_id:status.IN_PROGRESS}
    try{
    const result = await authAxios.post(`/compressors`dataWithStatus)
      setIdCreatedCompressor(result.data)
      console.log(idCreatedCompressor);
    }catch(err){
      console.log("AXIOS ERROR"err.message);
    }
  }
    

 

 

constNicknameInput = (fieldRenderProps=> {

  
      const { validationMessagevisited, ...others } = fieldRenderProps;
      return (
        <div> 
             <label for="nickname-name" className="text-info">Nickname</label>
             <Input type="text" name="nickname" placeholder=""
              style={{height: "30px"}}
              onChange={e=>setCompNickname(e.target.value)}
              {...others}/>
              {visited && validationMessage && <Error>{validationMessage}</Error>}
        </div>
      );
    };
    
    const SerialNoInput = (fieldRenderProps=> {
      const { validationMessagevisited, ...others } = fieldRenderProps;
      return (
        <div>
              <label for="serial-no-name" className="text-info">Serial No</label>
              <Input type="text" name="serialNo" placeholder=""
              style={{height: "30px"}}
              onChange={e=>setCompSerialNo(e.target.value)}
              {...others}/>
              {visited && validationMessage && <Error>{validationMessage}</Error>}
        </div>
      );
    };
    
    const MotorPowerInput = (fieldRenderProps=> {
      const { validationMessagevisited, ...others } = fieldRenderProps;
      return (
        <div>
            <label for="motor-power-name" className="text-info">Motor Power</label>
            <Input type="text" name="motor-power" placeholder="ex: 75"
               style={{height: "30px"}}
               onChange={e=>setCompMotorPower(e.target.value)}
               {...others}/> 
              {visited && validationMessage && <Error>{validationMessage}</Error>}
        </div>
      );
    }; 
    const pressureUnitInput = (fieldRenderProps=> {
      const { validationMessagevisited, ...others } = fieldRenderProps;
      return (
        <div> 
            <label for="rated-pressure-name" className="text-info">Rated Pressure</label>
            <Input type="text" name="pressure" placeholder=""
            style={{height: "30px"}}
            onChange={e=>setCompPressure(e.target.value)}
            {...others}/>
            <label for="rated-pressure-unit" className="text-info">{compPressureUnit}</label> 
            {visited && validationMessage && <Error>{validationMessage}</Error>}
        </div>
      );
    }; 
    const OutputInput = (fieldRenderProps=> {
      const { validationMessagevisited, ...others } = fieldRenderProps;
      return (
        <div> 
            <label for="output-name" className="text-info">Output</label>
            <Input type="text" name="motor-power" placeholder="ex: 75"
            style={{height: "30px"}}
            onChange={e=>setCompOutput(e.target.value)}
            {...others}/>
            <label for="output-unit" className="text-info">{compOutputUnit}</label> 
            {visited && validationMessage && <Error>{validationMessage}</Error>}
        </div>
      );
    }; 
     
  
  return (
          <Form className="mt-3 mb-4 px-0" onSubmit={postCompressorSave}
          render={(formRenderProps=> (
            <FormElement
              style={{
                maxWidth: 650,
              }}
            >
              <fieldset className={"k-form-fieldset"}> 
                <div className="mb-3">
                  <Field
                    name={"nickname"}
                    component={NicknameInput} 
                    validator={inputValidator}
                  /> 
                </div> 
                <div className="mb-3">
                  <Field
                    name={"serialNo"}
                    component={SerialNoInput} 
                    validator={inputValidator}
                  /> 
                </div> 
                <div className="mb-3">
                  <label for="cooling-name" className="text-info">Cooling</label>
                  <DropDownList
                      value={compCooling}
                      textField="text"
                      dataItemKey="id" 
                      onChange={(e=> {
                        setCompCooling(e.target.value);
                      }}
                      data={compCoolings}
                    /> 
                </div>
                <div className="mb-3">
                  <label for="year-manufactured-name" className="text-info">Year Manufactured</label>
                  <DropDownList
                        value={compYear}
                        textField="text"
                        dataItemKey="id" 
                        onChange={(e=> {
                          setCompYear(e.target.value);
                        }}
                        data={years}
                      />   
                </div>
                <div>
                  <label for="power-supply-name" className="text-info">Power Supply</label>
                  <DropDownList
                        value={compPowerSupply}
                        textField="text"
                        dataItemKey="id" 
                        onChange={(e=> {
                          setCompPowerSupply(e.target.value);
                        }}
                        data={compPowerSupplies}
                      /> 
                </div>  
                <div className="mb-3">
                  <Field
                    name={"motorPower"}
                    component={MotorPowerInput} 
                    validator={inputValidator}
                  /> 
                </div>   
                <div className="mb-3">
                  <Field
                    name={"ratedPressure"}
                    component={pressureUnitInput} 
                    validator={inputValidator}
                  /> 
                </div>    
                <div className="mb-3">
                  <Field
                    name={"output"}
                    component={OutputInput} 
                    validator={inputValidator}
                  /> 
                </div>    
              </fieldset>
              <div className="k-form-buttons">
                <button type={"submit"} className="btn btn-outline-success btn-block mt-1" 
                  style={{height: "30px"fontSize: "16px"paddingTop: "4px"}}>
                  Save
                </button>
              </div>
            </FormElement>
          )}
        />
              
  )
}
Stefan
Telerik team
 answered on 22 Oct 2021
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
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?